+ private String simulateResp( DR_Sub sub, String action ){
+ String server = "subscriber.onap.org";
+ String subid;
+ if ( action.equals( "POST" ) ) {
+ RandomInteger ran = new RandomInteger(10000);
+ subid = Integer.toString( ran.next() );
+ } else if ( action.equals( "PUT" ) ) {
+ subid = sub.getSubId();
+ } else {
+ subid = "99";
+ }
+ String ret = String.format("{\"delivery\": {\"url\": \"https://%s/delivery/%s\", \"user\": \"joe\", \"password\": \"secret\", \"use100\": true}, \"metadataOnly\": false, \"groupid\": \"0\" , \"follow_redirect\": true }",
+ server, subid );
+
+ return ret;
+ }