### Question:
DefaultLightblueDiagnosticsResponse extends AbstractLightblueResponse implements LightblueDiagnosticsResponse { @Override public boolean allHealthy() { List<DiagnosticsElement> diagnosticsElements = getDiagnostics(); for (DiagnosticsElement element : diagnosticsElements){ if(!element.isHealthy()){ return false; } } return true; } DefaultLightblueDiagnosticsResponse(String responseText, Map<String, List<String>> headers);  DefaultLightblueDiagnosticsResponse(String responseText, Map<String, List<String>> headers,
            ObjectMapper mapper); @Override DiagnosticsElement getDiagnostics(String diagnosticsElementName); @Override boolean hasDiagnostics(String diagnosticsElementName); @Override List<DiagnosticsElement> getDiagnostics(); @Override boolean allHealthy();  }### Answer:
@Test public void testAllHealthy() throws Exception { URI uri = this.getClass().getClassLoader().getResource("diagnostics/lightblue-healthy-response.json").toURI(); String diagnosticsSuccessResponse = new String(Files.readAllBytes(Paths.get(uri)), Charset.forName("utf-8")); DefaultLightblueDiagnosticsResponse testResponse = new DefaultLightblueDiagnosticsResponse(diagnosticsSuccessResponse, null); Assert.assertEquals(true, testResponse.allHealthy()); }
@Test public void testAllNotHealthy() throws Exception { URI uri = this.getClass().getClassLoader().getResource("diagnostics/lightblue-unhealthy-response.json").toURI(); String diagnosticsFailureResponse = new String(Files.readAllBytes(Paths.get(uri)), Charset.forName("utf-8")); DefaultLightblueDiagnosticsResponse testResponse = new DefaultLightblueDiagnosticsResponse(diagnosticsFailureResponse, null); Assert.assertEquals(false, testResponse.allHealthy()); }