@Test(dataProvider = "statuses") public void testHealth(final RestTemplate restTemplate, final Status status, final AcsMonitoringUtilities.HealthCode healthCode) throws Exception { UaaHealthIndicator uaaHealthIndicator = new UaaHealthIndicator(restTemplate); Assert.assertEquals(status, uaaHealthIndicator.health().getStatus()); Assert.assertEquals(uaaHealthIndicator.getDescription(), uaaHealthIndicator.health().getDetails().get(AcsMonitoringUtilities.DESCRIPTION_KEY)); if (healthCode == AcsMonitoringUtilities.HealthCode.AVAILABLE) { Assert.assertFalse(uaaHealthIndicator.health().getDetails().containsKey(AcsMonitoringUtilities.CODE_KEY)); } else { Assert.assertEquals(healthCode, uaaHealthIndicator.health().getDetails().get(AcsMonitoringUtilities.CODE_KEY)); } }
@Override public Health health() { return AcsMonitoringUtilities.health(this::check, this.getDescription()); }
UaaHealthIndicator implements HealthIndicator { @Override public Health health() { return AcsMonitoringUtilities.health(this::check, this.getDescription()); } }
UaaHealthIndicator implements HealthIndicator { @Override public Health health() { return AcsMonitoringUtilities.health(this::check, this.getDescription()); } @Autowired  UaaHealthIndicator(final RestTemplate uaaTemplate); }
UaaHealthIndicator implements HealthIndicator { @Override public Health health() { return AcsMonitoringUtilities.health(this::check, this.getDescription()); } @Autowired  UaaHealthIndicator(final RestTemplate uaaTemplate); @Override Health health(); }
UaaHealthIndicator implements HealthIndicator { @Override public Health health() { return AcsMonitoringUtilities.health(this::check, this.getDescription()); } @Autowired  UaaHealthIndicator(final RestTemplate uaaTemplate); @Override Health health();  }