Add tests to increase code coverage
[nonrtric.git] / policy-agent / src / main / java / org / oransc / policyagent / configuration / ApplicationConfigParser.java
index 5495710..a76f964 100644 (file)
@@ -71,6 +71,10 @@ public class ApplicationConfigParser {
 
         JsonObject agentConfigJson = root.getAsJsonObject(CONFIG);
 
+        if (agentConfigJson == null) {
+            throw new ServiceException("Missing root configuration \"" + CONFIG + "\" in JSON: " + root);
+        }
+
         JsonObject json = agentConfigJson.getAsJsonObject("streams_publishes");
         if (json != null) {
             dmaapPublisherConfig = parseDmaapConfig(json);