Remove new code smells
[nonrtric.git] / policy-agent / src / test / java / org / oransc / policyagent / MockPolicyAgent.java
index bbbc06d..b0f1e7f 100644 (file)
@@ -61,7 +61,7 @@ public class MockPolicyAgent {
     }
 
     /**
-     * overrides the BeanFactory
+     * Overrides the BeanFactory.
      */
     @TestConfiguration
     static class TestBeanFactory {
@@ -121,7 +121,6 @@ public class MockPolicyAgent {
                 }
             }
         }
-
     }
 
     @LocalServerPort
@@ -139,12 +138,14 @@ public class MockPolicyAgent {
     }
 
     private static String title(String jsonSchema) {
-        JsonObject parsedSchema = (JsonObject) new JsonParser().parse(jsonSchema);
+        JsonObject parsedSchema = (JsonObject) JsonParser.parseString(jsonSchema);
         String title = parsedSchema.get("title").getAsString();
         return title;
     }
 
     @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 {
         keepServerAlive();
     }