@Test public void testDownConnectivity() throws InterruptedException, ExecutionException, TimeoutException { doReturn(Health.up().build()).when(applicationsHealthIndicator).health(); doReturn(Health.down().build()).when(servicesHealthIndicator).health(); CompositeHealthEndpoint endpoint = new CompositeHealthEndpoint(aggregator, applicationsHealthIndicator, servicesHealthIndicator); Health health = endpoint.invoke(); assertEquals( builder.down().withDetail(MESSAGE, "Required services are not available").build(), health); }
@Override public Health invoke() { return this.healthIndicator.health(); }
CompositeHealthEndpoint extends HealthEndpoint { @Override public Health invoke() { return this.healthIndicator.health(); } }
CompositeHealthEndpoint extends HealthEndpoint { @Override public Health invoke() { return this.healthIndicator.health(); } @Autowired  CompositeHealthEndpoint(IntegrationBridgeHealthAggregator healthAggregator,
      ApplicationsHealthIndicator applicationsHealthIndicator,
      CompositeServiceHealthIndicator servicesHealthIndicator); }
CompositeHealthEndpoint extends HealthEndpoint { @Override public Health invoke() { return this.healthIndicator.health(); } @Autowired  CompositeHealthEndpoint(IntegrationBridgeHealthAggregator healthAggregator,
      ApplicationsHealthIndicator applicationsHealthIndicator,
      CompositeServiceHealthIndicator servicesHealthIndicator); @Override Health invoke(); }
CompositeHealthEndpoint extends HealthEndpoint { @Override public Health invoke() { return this.healthIndicator.health(); } @Autowired  CompositeHealthEndpoint(IntegrationBridgeHealthAggregator healthAggregator,
      ApplicationsHealthIndicator applicationsHealthIndicator,
      CompositeServiceHealthIndicator servicesHealthIndicator); @Override Health invoke();  }