Route53RaiderImpl implements Route53Raider { @Override public List<HealthCheckObservation> getHealthCheckerStatus(String healthCheckerId) { GetHealthCheckStatusRequest getHealthCheckStatusRequest = new GetHealthCheckStatusRequest(); getHealthCheckStatusRequest.withHealthCheckId(healthCheckerId); return route53Delegator.getAmazonRoute53().getHealthCheckStatus(getHealthCheckStatusRequest).getHealthCheckObservations(); } Route53RaiderImpl(); @Override List<HealthCheck> listHealthCheckers(); @Override List<HealthCheckObservation> getHealthCheckerStatus(String healthCheckerId); @Override HealthCheckStatus getSimpleHealthCheckerStatus(String healthCheckerId); @Override void updateTrafficPolicy(String trafficPolicyName, int version); @Override int getTrafficPolicyVersion(String trafficPolicyName); String getR53PolicyId(String policyId); @Override void updateHealthCheckRegions(String healthCheckId, List<String> regions); @Override List<String> getHealthCheckRegions(String healthCheckId); @Override void updateHealthCheckToDefaultRegions(String healthCheckId);  }
@Test public void testGetHealthCheckerStatus() { GetHealthCheckStatusResult getHealthCheckStatusResult = PowerMockito.mock(GetHealthCheckStatusResult.class); Mockito.when(mockAmazonRoute53.getHealthCheckStatus(Mockito.anyObject())).thenReturn(getHealthCheckStatusResult); Mockito.when(getHealthCheckStatusResult.getHealthCheckObservations()).thenReturn(createMultipleSuccessHealthObs()); List<HealthCheckObservation> healthCheckObservations = route53RaiderUnderTest.getHealthCheckerStatus(SW1_R53_HEALTH_CHECK_ID); Assert.assertEquals(healthCheckObservations.size(), 2); Assert.assertEquals(healthCheckObservations.get(0).getStatusReport().getStatus(),"Success"); }