X-Git-Url: https://gerrit.onap.org/r/gitweb?p=policy%2Fengine.git;a=blobdiff_plain;f=POLICY-SDK-APP%2Fsrc%2Ftest%2Fjava%2Forg%2Fonap%2Fpolicy%2Fcontroller%2FPDPControllerTest.java;h=372090fdfc644b83b8c9489dbef76ca63e0157af;hp=0d5a09754a3a0f46172cb27327545c2454550ccc;hb=dbfa1570cd26d19b346287a6fb06f2d8a03f4a06;hpb=b831c6a3df8e1dc9017ae5e8ad002dc3b1002aab diff --git a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java index 0d5a09754..372090fdf 100644 --- a/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java +++ b/POLICY-SDK-APP/src/test/java/org/onap/policy/controller/PDPControllerTest.java @@ -22,6 +22,7 @@ package org.onap.policy.controller; +import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertTrue; import java.io.UnsupportedEncodingException; @@ -50,6 +51,11 @@ public class PDPControllerTest extends Mockito { private Set groups; private static List rolesdata; + /** + * Before. + * + * @throws Exception Exception + */ @Before public void setUp() throws Exception { logger.info("setUp: Entering"); @@ -79,9 +85,9 @@ public class PDPControllerTest extends Mockito { } @Test - public void testPDPGroupData() { - HttpServletRequest request = mock(HttpServletRequest.class); - MockHttpServletResponse response = new MockHttpServletResponse(); + public void testPdpGroupData() { + final HttpServletRequest request = mock(HttpServletRequest.class); + final MockHttpServletResponse response = new MockHttpServletResponse(); PolicyController controller = mock(PolicyController.class); PDPController pdpController = new PDPController(); pdpController.setJunit(true);; @@ -95,4 +101,17 @@ public class PDPControllerTest extends Mockito { logger.error("Exception Occured" + e); } } + + @Test + public void testPdpData() { + PdpData data = new PdpData(); + data.setId("id"); + assertEquals("id", data.getId()); + data.setDescription("foo"); + assertEquals("foo", data.getDescription()); + data.setJmxPort(0); + assertEquals(0, data.getJmxPort()); + data.setName("name"); + assertEquals("name", data.getName()); + } }