+if [ $DUP_CHECK == 1 ]; then
+ echo "=== API: Create policy instance pi11 (copy of pi1) of type: 1. Shall fail ==="
+ RESULT=""
+ do_curl PUT '/a1-p/policytypes/1/policies/pi11' 400 jsonfiles/pi1.json
+else
+ echo "=== API: Create policy instance pi11 (copy of pi1) of type: 1. Shall succeed ==="
+ RESULT=""
+ do_curl PUT '/a1-p/policytypes/1/policies/pi11' 202 jsonfiles/pi1.json
+
+ echo "=== Delete policy instance: pi11 ==="
+ RESULT=""
+ do_curl DELETE '/a1-p/policytypes/1/policies/pi11' 202
+fi
+
+if [ $DUP_CHECK == 1 ]; then
+ echo "=== API: Create policy instance pi3 (copy of pi1) of type: 2. Shall fail ==="
+ RESULT=""
+ do_curl PUT '/a1-p/policytypes/1/policies/pi3' 400 jsonfiles/pi1.json
+else
+ echo "=== API: Create policy instance pi3 (copy of pi1) of type: 1. Shall succeed ==="
+ RESULT=""
+ do_curl PUT '/a1-p/policytypes/1/policies/pi3' 202 jsonfiles/pi1.json
+
+ echo "=== Delete policy instance: pi3 ==="
+ RESULT=""
+ do_curl DELETE '/a1-p/policytypes/1/policies/pi3' 202
+fi
+
+
+echo "=== API: Get instances for type 1, shall contain pi1 ==="
+RESULT="json:[ \"pi1\" ]"
+do_curl GET '/a1-p/policytypes/1/policies' jsonfiles/200
+
+echo "=== API: Get instances for type 2, shall contain pi2 ==="
+RESULT="json:[ \"pi2\" ]"
+do_curl GET '/a1-p/policytypes/2/policies' 200
+
+