Merge "Change formatting of API documentation"
[nonrtric.git] / policy-agent / src / test / java / org / oransc / policyagent / MockPolicyAgent.java
index efbd576..cdf614c 100644 (file)
@@ -123,20 +123,17 @@ public class MockPolicyAgent {
                     logger.error("Could not load json schema ", e);
                 }
             }
+            policyTypes.put(ImmutablePolicyType.builder().name("").schema("{}").build());
         }
     }
 
     @LocalServerPort
     private int port;
 
-    private void keepServerAlive() {
+    private void keepServerAlive() throws InterruptedException {
         logger.info("Keeping server alive!");
-        try {
-            synchronized (this) {
-                this.wait();
-            }
-        } catch (Exception ex) {
-            logger.error("Unexpected: " + ex);
+        synchronized (this) {
+            this.wait();
         }
     }
 
@@ -147,7 +144,8 @@ public class MockPolicyAgent {
     }
 
     @Test
-    @SuppressWarnings("squid:S2699") // Tests should include assertions. This test is only for keeping the server alive,
+    @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();