public EndpointResponse checkClusterStatus() {
    final ClusterStatusResponse response = getResponse();
    return EndpointResponse.ok(response);
  }
@Test
  public void shouldReturnClusterStatus() {
    // Given:
    when(heartbeatAgent.getHostsStatus()).thenReturn(HOSTS);
    when(lagReportingAgent.getLagPerHost(any())).thenReturn(Optional.empty());

    // When:
    final EndpointResponse response = clusterStatusResource.checkClusterStatus();

    // Then:
    assertThat(response.getStatus(), is(200));
    assertThat(response.getEntity(), instanceOf(ClusterStatusResponse.class));

    ClusterStatusResponse clusterStatusResponse = (ClusterStatusResponse) response.getEntity();
    assertTrue(clusterStatusResponse.getClusterStatus().get(HOST1_ENTITY).getHostAlive());
    assertFalse(clusterStatusResponse.getClusterStatus().get(HOST2_ENTITY).getHostAlive());
  }