Remove Sonar warnings
[nonrtric.git] / policy-agent / src / test / java / org / oransc / policyagent / MockPolicyAgent.java
index d8a9718..d37a2be 100644 (file)
@@ -55,7 +55,7 @@ import org.springframework.util.StringUtils;
 
 @ExtendWith(SpringExtension.class)
 @SpringBootTest(webEnvironment = WebEnvironment.DEFINED_PORT)
-public class MockPolicyAgent {
+class MockPolicyAgent {
     private static final Logger logger = LoggerFactory.getLogger(MockPolicyAgent.class);
 
     @Autowired
@@ -67,6 +67,9 @@ public class MockPolicyAgent {
     @Autowired
     PolicyTypes policyTypes;
 
+    @Autowired
+    ApplicationConfig applicationConfig;
+
     static class MockApplicationConfig extends ApplicationConfig {
         @Override
         public String getLocalConfigurationFilePath() {
@@ -183,6 +186,7 @@ public class MockPolicyAgent {
             .ric(ric) //
             .type(unnamedPolicyType) //
             .lastModified("now") //
+            .isTransient(false) //
             .build();
         this.policies.put(policy);
     }
@@ -194,9 +198,9 @@ public class MockPolicyAgent {
     }
 
     @Test
-    @SuppressWarnings("squid:S2699") // Tests should include assertions. This test is only for keeping the server alive,
-                                     // so it will only be confusing to add an assertion.
-    public void runMock() throws Exception {
+    @SuppressWarnings("squid:S2699") // Tests should include assertions. This test is only for keeping the server
+                                     // alive, so it will only be confusing to add an assertion.
+    void runMock() throws Exception {
         keepServerAlive();
     }