Add unit tests for OscA1Client
[nonrtric.git] / policy-agent / src / test / java / org / oransc / policyagent / clients / A1ClientHelper.java
index e0f885d..7906446 100644 (file)
@@ -82,4 +82,10 @@ public class A1ClientHelper {
         return ImmutablePolicyType.builder().name(name).schema("schema").build();
     }
 
+    protected static String getCreateSchema(String policyType, String policyTypeId) {
+        JSONObject obj = new JSONObject(policyType);
+        JSONObject schemaObj = obj.getJSONObject("create_schema");
+        schemaObj.put("title", policyTypeId);
+        return schemaObj.toString();
+    }
 }