@Test public void testUp() { List<IntegrationHealth> appsHealth = mockApplications(); Health healthApplications = mockAppsHealth(Status.UP, appsHealth); Map<String, IntegrationBridgeServiceInfo> services = mockServices(); Health healthServices = mockServicesHealth(Status.UP, services); Map<String, Health> healths = new HashMap<>(); healths.put(APPLICATIONS, healthApplications); healths.put(SERVICES, healthServices); Health expected = builder.up() .withDetail(MESSAGE, "Success") .withDetail(SERVICES, services) .withDetail(APPLICATIONS, appsHealth) .build(); assertEquals(expected, aggregator.aggregate(healths)); }
private Health.Builder up() { return Health.up().withDetail(MESSAGE, SUCCESS_MESSAGE); }
IntegrationBridgeHealthAggregator implements HealthAggregator { private Health.Builder up() { return Health.up().withDetail(MESSAGE, SUCCESS_MESSAGE); } }
IntegrationBridgeHealthAggregator implements HealthAggregator { private Health.Builder up() { return Health.up().withDetail(MESSAGE, SUCCESS_MESSAGE); } IntegrationBridgeHealthAggregator(); }
IntegrationBridgeHealthAggregator implements HealthAggregator { private Health.Builder up() { return Health.up().withDetail(MESSAGE, SUCCESS_MESSAGE); } IntegrationBridgeHealthAggregator(); @Override Health aggregate(Map<String, Health> healths); }
IntegrationBridgeHealthAggregator implements HealthAggregator { private Health.Builder up() { return Health.up().withDetail(MESSAGE, SUCCESS_MESSAGE); } IntegrationBridgeHealthAggregator(); @Override Health aggregate(Map<String, Health> healths);  }