New Optimization Policy
[policy/engine.git] / ONAP-PDP-REST / src / test / java / org / onap / policy / pdp / rest / api / services / ConfigPolicyServiceTest.java
index 389d9bf..16f5a47 100644 (file)
 package org.onap.policy.pdp.rest.api.services;
 
 import static org.junit.Assert.assertEquals;
+
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.util.Arrays;
+import java.util.List;
+import java.util.Properties;
+
 import org.junit.Test;
-import org.onap.policy.api.PolicyException;
 import org.onap.policy.api.PolicyParameters;
 
 public class ConfigPolicyServiceTest {
        @Test
-       public void testRaw() throws PolicyException  {
+       public void testRaw() throws FileNotFoundException, IOException  {
+               Properties prop = new Properties();
+               prop.load(new FileInputStream("src/test/resources/pass.xacml.pdp.properties"));
+               String succeeded = prop.getProperty("xacml.rest.pap.url");
+               List<String> paps = Arrays.asList(succeeded.split(","));
+               PAPServices.setPaps(paps);
+               PAPServices.setJunit(true);
+               
                String systemKey = "xacml.properties";
                String testVal = "testVal";
                PolicyParameters testParams = new PolicyParameters();