Merge "ONAP code change for log files consolidation"
[policy/engine.git] / ONAP-PAP-REST / src / test / java / org / onap / policy / pap / xacml / rest / components / MicroServicePolicyTest.java
index fa4bd20..a47c2be 100644 (file)
@@ -40,7 +40,6 @@ import java.io.File;
 import java.util.Collections;
 
 @RunWith(PowerMockRunner.class)
-@PrepareForTest({MicroServiceConfigPolicy.class, CreateNewMicroServiceModel.class})
 public class MicroServicePolicyTest {
        @Rule
     public ExpectedException thrown = ExpectedException.none();
@@ -60,6 +59,7 @@ public class MicroServicePolicyTest {
                assertNull(policy.getCorrectPolicyDataObject());
        }
        
+       @PrepareForTest({MicroServiceConfigPolicy.class})
        @Test
        public void testPrepareToSave() throws Exception {
                // Need to mock internal dictionary retrieval
@@ -84,6 +84,7 @@ public class MicroServicePolicyTest {
                assertNotNull(model);
        }
        
+       @PrepareForTest({CreateNewMicroServiceModel.class})
        @Test
        public void testCreateModel() throws Exception {
                // Mock file retrieval
@@ -104,7 +105,7 @@ public class MicroServicePolicyTest {
                String testFileName = "testFile.zip";
                String testVal = "testVal";
                CreateNewMicroServiceModel model = new CreateNewMicroServiceModel(testFileName, testVal, testVal, testVal, testVal);
-               model.addValuesToNewModel();
+               model.addValuesToNewModel(".xmi");
                model.saveImportService();
        }
 }