/*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2019-2020 Nordix Foundation.
+ *  Modifications Copyright (C) 2020 AT&T Inc.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
     public static void setUpClass() {
         // To skip calling to the remote components
         PapParameterGroup papParameterGroup = ParameterService.get("PapGroup");
-        List<BusTopicParams> lo = Whitebox.getInternalState(papParameterGroup,
-            "healthCheckRestClientParameters");
+        List<BusTopicParams> lo = Whitebox.getInternalState(papParameterGroup, "healthCheckRestClientParameters");
         savedBusTopicParams = new ArrayList<>(lo);
         lo.clear();
     }
     @AfterClass
     public static void tearDownClass() {
         PapParameterGroup papParameterGroup = ParameterService.get("PapGroup");
-        List<BusTopicParams> lo = Whitebox.getInternalState(papParameterGroup,
-            "healthCheckRestClientParameters");
+        List<BusTopicParams> lo = Whitebox.getInternalState(papParameterGroup, "healthCheckRestClientParameters");
         lo.addAll(savedBusTopicParams);
     }
 
     }
 
     @Test
+    @SuppressWarnings("unchecked")
     public void testPolicyComponentsHealthCheck() throws Exception {
         Invocation.Builder invocationBuilder = sendRequest(ENDPOINT);
         Response response = invocationBuilder.get();
 
 /*-
  * ============LICENSE_START=======================================================
  *  Copyright (C) 2020 Nordix Foundation.
+ *  Modifications Copyright (C) 2020 AT&T Corp.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
         when(client1.getName()).thenReturn(CLIENT_1);
         when(client1.getBaseUrl()).thenReturn("url1");
         when(response1.getStatus()).thenReturn(HttpURLConnection.HTTP_OK);
-        when(response1.readEntity(HealthCheckReport.class))
-            .thenReturn(createReport(HttpURLConnection.HTTP_OK, true));
+        when(response1.readEntity(HealthCheckReport.class)).thenReturn(createReport(HttpURLConnection.HTTP_OK, true));
         when(client1.get()).thenReturn(response1);
 
         when(client2.getName()).thenReturn("client2");
         when(client2.getBaseUrl()).thenReturn("url2");
         when(response2.getStatus()).thenReturn(HttpURLConnection.HTTP_OK);
-        when(response2.readEntity(HealthCheckReport.class))
-            .thenReturn(createReport(HttpURLConnection.HTTP_OK, true));
+        when(response2.readEntity(HealthCheckReport.class)).thenReturn(createReport(HttpURLConnection.HTTP_OK, true));
         when(client2.get()).thenReturn(response2);
 
-        PapParameterGroup papParameterGroup =  ParameterService.get(PAP_GROUP_PARAMS_NAME);
+        PapParameterGroup papParameterGroup = ParameterService.get(PAP_GROUP_PARAMS_NAME);
         List<BusTopicParams> params = papParameterGroup.getHealthCheckRestClientParameters();
         when(clientFactory.build(params.get(0))).thenReturn(client1);
         when(clientFactory.build(params.get(1))).thenReturn(client2);
     public void testFetchPolicyComponentsHealthStatus_unhealthyClient() throws Exception {
         when(response1.getStatus()).thenReturn(HttpURLConnection.HTTP_INTERNAL_ERROR);
         when(response1.readEntity(HealthCheckReport.class))
-            .thenReturn(createReport(HttpURLConnection.HTTP_INTERNAL_ERROR, false));
+                .thenReturn(createReport(HttpURLConnection.HTTP_INTERNAL_ERROR, false));
         Map<String, Object> result = callFetchPolicyComponentsHealthStatus();
         assertFalse((Boolean) result.get("healthy"));
         HealthCheckReport report = (HealthCheckReport) result.get(CLIENT_1);
         assertFalse(report.isHealthy());
 
         when(response1.getStatus()).thenReturn(HttpURLConnection.HTTP_OK);
-        when(response1.readEntity(HealthCheckReport.class))
-            .thenReturn(createReport(HttpURLConnection.HTTP_OK, false));
+        when(response1.readEntity(HealthCheckReport.class)).thenReturn(createReport(HttpURLConnection.HTTP_OK, false));
         Map<String, Object> result2 = callFetchPolicyComponentsHealthStatus();
         assertFalse((Boolean) result2.get("healthy"));
         HealthCheckReport report2 = (HealthCheckReport) result.get(CLIENT_1);
-        assertFalse(report.isHealthy());
+        assertFalse(report2.isHealthy());
     }
 
+    @SuppressWarnings("unchecked")
     @Test
     public void testFetchPolicyComponentsHealthStatus_unhealthyPdps() throws Exception {
-        //Get a PDP and set it unhealthy
-        groups.get(0).getPdpSubgroups().get(0)
-            .getPdpInstances().get(0).setHealthy(PdpHealthStatus.NOT_HEALTHY);
+        // Get a PDP and set it unhealthy
+        groups.get(0).getPdpSubgroups().get(0).getPdpInstances().get(0).setHealthy(PdpHealthStatus.NOT_HEALTHY);
         Map<String, Object> result = callFetchPolicyComponentsHealthStatus();
         Map<String, List<Pdp>> pdpListWithType = (Map<String, List<Pdp>>) result.get(PapConstants.POLICY_PDPS);
         assertEquals(2, pdpListWithType.size());
             throw new RuntimeException(e);
         }
     }
-}
\ No newline at end of file
+}