Use new addTopic() method in xacml-pdp
[policy/xacml-pdp.git] / main / src / test / java / org / onap / policy / pdpx / main / startstop / TestXacmlPdpActivator.java
index b60f458..cd4b78d 100644 (file)
@@ -1,6 +1,7 @@
 /*-
  * ============LICENSE_START=======================================================
  * Copyright (C) 2019 AT&T Intellectual Property. All rights reserved.
+ * Modifications Copyright (C) 2019 Nordix Foundation.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -25,8 +26,6 @@ import static org.junit.Assert.assertFalse;
 import static org.junit.Assert.assertSame;
 import static org.junit.Assert.assertTrue;
 
-import java.io.FileInputStream;
-import java.util.Properties;
 import org.junit.After;
 import org.junit.Before;
 import org.junit.BeforeClass;
@@ -44,7 +43,6 @@ import org.onap.policy.pdpx.main.parameters.XacmlPdpParameterHandler;
  */
 public class TestXacmlPdpActivator extends CommonRest {
     private static XacmlPdpParameterGroup parGroup;
-    private static Properties props;
 
     private XacmlPdpActivator activator = null;
 
@@ -55,17 +53,10 @@ public class TestXacmlPdpActivator extends CommonRest {
     public static void setUpBeforeClass() throws Exception {
         CommonRest.setUpBeforeClass();
 
-        final String[] xacmlPdpConfigParameters =
-            {"-c", CommonRest.CONFIG_FILE, "-p", "parameters/topic.properties"};
+        final String[] xacmlPdpConfigParameters = {"-c", CommonRest.CONFIG_FILE};
         final XacmlPdpCommandLineArguments arguments = new XacmlPdpCommandLineArguments(xacmlPdpConfigParameters);
         parGroup = new XacmlPdpParameterHandler().getParameters(arguments);
 
-        props = new Properties();
-        String propFile = arguments.getFullPropertyFilePath();
-        try (FileInputStream stream = new FileInputStream(propFile)) {
-            props.load(stream);
-        }
-
         // don't want the common "main" running
         CommonRest.stopMain();
     }
@@ -75,7 +66,7 @@ public class TestXacmlPdpActivator extends CommonRest {
      */
     @Before
     public void setUp() {
-        activator = new XacmlPdpActivator(parGroup, props);
+        activator = new XacmlPdpActivator(parGroup);
     }
 
     @Test