Updated documentation and scripts using https between agent and MR

Documentation of all api test script for function test scripts

Enabled testcase to test both http and https between the policy agent and MR

POST message to MR now also support single message that is not in an array

Change-Id: I8540244786d941d0387425667adb637e66e1ce2e
Issue-ID: NONRTRIC-154
Signed-off-by: BjornMagnussonXA <bjorn.magnusson@est.tech>
diff --git a/test/mrstub/basic_test.sh b/test/mrstub/basic_test.sh
index e9ca1d2..8b2347d 100755
--- a/test/mrstub/basic_test.sh
+++ b/test/mrstub/basic_test.sh
@@ -72,7 +72,7 @@
 do_curl GET '/events/A1-POLICY-AGENT-READ/users/policy-agent' 200
 
 echo "=== Send a json response ==="
-# Create minimal accepted response message
+# Create minimal accepted response message, array
 echo "[{\"correlationId\": \""$CORRID"\", \"message\": {\"test\":\"testresponse\"}, \"status\": \"200\"}]" > .tmp.json
 RESULT="{}"
 do_curl POST /events/A1-POLICY-AGENT-WRITE 200 .tmp.json
@@ -81,6 +81,16 @@
 RESULT="{\"test\": \"testresponse\"}200"
 do_curl GET '/receive-response?correlationid='$CORRID 200
 
+echo "=== Send a json response ==="
+# Create minimal accepted response message, single message - no array
+echo "{\"correlationId\": \""$CORRID"\", \"message\": {\"test\":\"testresponse2\"}, \"status\": \"200\"}" > .tmp.json
+RESULT="{}"
+do_curl POST /events/A1-POLICY-AGENT-WRITE 200 .tmp.json
+
+echo "=== Fetch a response ==="
+RESULT="{\"test\": \"testresponse2\"}200"
+do_curl GET '/receive-response?correlationid='$CORRID 200
+
 ### Test with plain text response
 
 echo "=== Send a request ==="