public EndpointResponse registerHeartbeat(final HeartbeatMessage request) {
    handleHeartbeat(request);
    return EndpointResponse.ok(new HeartbeatResponse(true));
  }
@Test
  public void shouldSendHeartbeat() {
    // When:
    final HeartbeatMessage request = new HeartbeatMessage(new KsqlHostInfoEntity("localhost", 8080),
        1);
    final EndpointResponse response = heartbeatResource.registerHeartbeat(request);

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