public EndpointResponse checkHealth() {
    return EndpointResponse.ok(getResponse());
  }
@Test
  public void shouldRecheckHealthIfCachedResponseExpired() throws Exception {
    // Given:
    healthCheckResource = new HealthCheckResource(healthCheckAgent, Duration.ofMillis(10));
    healthCheckResource.checkHealth();

    // When / Then:
    assertThatEventually(
        "Should receive response2 once response1 expires.",
        () -> healthCheckResource.checkHealth().getEntity(),
        is(response2),
        1000,
        TimeUnit.MILLISECONDS
    );
  }