X-Git-Url: https://gerrit.onap.org/r/gitweb?a=blobdiff_plain;f=ONAP-XACML%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fxacml%2Ftest%2Fstd%2Fpap%2FStdPDPGroupStatusTest.java;fp=ONAP-XACML%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fxacml%2Ftest%2Fstd%2Fpap%2FStdPDPGroupStatusTest.java;h=5dcebcd897bcd5728fdce7d5ecac458d47044bdc;hb=d089848fdb0beef8446bdcf60cdb14e4655a93e5;hp=55413d83b84610157b81737a68dec0bb8c315504;hpb=a2ab61f0ad39970ad35c3e47ff8429f59850c469;p=policy%2Fengine.git diff --git a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPGroupStatusTest.java b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPGroupStatusTest.java index 55413d83b..5dcebcd89 100644 --- a/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPGroupStatusTest.java +++ b/ONAP-XACML/src/test/java/org/onap/policy/xacml/test/std/pap/StdPDPGroupStatusTest.java @@ -2,7 +2,7 @@ * ============LICENSE_START======================================================= * ONAP-XACML * ================================================================================ - * Copyright (C) 2017 AT&T Intellectual Property. All rights reserved. + * Copyright (C) 2017, 2019 AT&T Intellectual Property. All rights reserved. * ================================================================================ * Modifications Copyright (C) 2019 Samsung * ================================================================================ @@ -19,13 +19,22 @@ * limitations under the License. * ============LICENSE_END========================================================= */ + package org.onap.policy.xacml.test.std.pap; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; + +import com.att.research.xacml.api.pap.PDP; +import com.att.research.xacml.api.pap.PDPGroupStatus.Status; +import com.att.research.xacml.api.pap.PDPPIPConfig; +import com.att.research.xacml.api.pap.PDPPolicy; + import java.util.HashSet; import java.util.Set; + import org.junit.Before; import org.junit.Test; import org.onap.policy.common.logging.flexlogger.FlexLogger; @@ -34,10 +43,6 @@ import org.onap.policy.xacml.std.pap.StdPDP; import org.onap.policy.xacml.std.pap.StdPDPGroupStatus; import org.onap.policy.xacml.std.pap.StdPDPPIPConfig; import org.onap.policy.xacml.std.pap.StdPDPPolicy; -import com.att.research.xacml.api.pap.PDP; -import com.att.research.xacml.api.pap.PDPGroupStatus.Status; -import com.att.research.xacml.api.pap.PDPPIPConfig; -import com.att.research.xacml.api.pap.PDPPolicy; public class StdPDPGroupStatusTest { @@ -45,6 +50,9 @@ public class StdPDPGroupStatusTest { private StdPDPGroupStatus stdPDPGroupStatus; + /** + * setUp. + */ @Before public void setUp() { @@ -96,7 +104,9 @@ public class StdPDPGroupStatusTest { public void testGetLoadWarnings() { try { stdPDPGroupStatus.setLoadWarnings(new HashSet<>()); - assertTrue(stdPDPGroupStatus.getLoadWarnings() != null); + assertNotNull(stdPDPGroupStatus.getLoadWarnings()); + stdPDPGroupStatus.addLoadWarning("warn"); + assertEquals(1, stdPDPGroupStatus.getLoadWarnings().size()); } catch (Exception e) { logger.error(e); } @@ -322,7 +332,6 @@ public class StdPDPGroupStatusTest { Set updatingPDPs = new HashSet<>(); updatingPDPs.add(new StdPDP()); - stdPDPGroupStatus.setStatus(status); stdPDPGroupStatus.setFailedPDPs(failedPDPs); stdPDPGroupStatus.setFailedPIPConfigs(failedPIPConfigs);