Merge "[DMAAP-DR-PROV] Remove aaf & cadi"
[dmaap/datarouter.git] / datarouter-prov / src / test / java / org / onap / dmaap / datarouter / provisioning / ProvServerTest.java
index a915fa8..1528a56 100644 (file)
 
 package org.onap.dmaap.datarouter.provisioning;
 
-import java.io.File;
-import java.io.IOException;
 import org.apache.commons.lang3.reflect.FieldUtils;
 import org.junit.Assert;
-import org.junit.Before;
 import org.junit.BeforeClass;
 import org.junit.Test;
-import org.onap.dmaap.datarouter.provisioning.utils.AafPropsUtils;
+import org.junit.runner.RunWith;
+import org.powermock.core.classloader.annotations.PowerMockIgnore;
+import org.powermock.modules.junit4.PowerMockRunner;
 
+@RunWith(PowerMockRunner.class)
+@PowerMockIgnore({"com.sun.org.apache.xerces.*", "javax.xml.*", "org.xml.*", "org.w3c.*"})
 public class ProvServerTest {
 
-    private AafPropsUtils aafPropsUtils;
-
-    @Before
-    public void setUp() {
-        try {
-            aafPropsUtils = new AafPropsUtils(new File("src/test/resources/aaf/org.onap.dmaap-dr.props"));
-        } catch (IOException e) {
-            e.printStackTrace();
-        }
-    }
-
     @BeforeClass
     public static void init() {
         System.setProperty(
             "org.onap.dmaap.datarouter.provserver.properties",
-            "src/test/resources/h2DatabaseTlsDisabled.properties");
+            "src/test/resources/h2Database.properties");
     }
 
     @Test
     public void Verify_Prov_Server_Is_Configured_Correctly() throws IllegalAccessException {
-        FieldUtils.writeDeclaredStaticField(ProvRunner.class, "aafPropsUtils", aafPropsUtils, true);
+        FieldUtils.writeDeclaredStaticField(ProvRunner.class, "tlsEnabled", false, true);
         Assert.assertNotNull(ProvServer.getServerInstance());
     }
 }