[ONOS-6409] Create throughput test for FlowObjective subsystem

Change-Id: I04689683b150a752510dbf20c37071edb890a0b0
diff --git a/apps/test/demo/src/main/java/org/onosproject/demo/DemoResource.java b/apps/test/demo/src/main/java/org/onosproject/demo/DemoResource.java
index 2ecd677..5ce3ab8 100644
--- a/apps/test/demo/src/main/java/org/onosproject/demo/DemoResource.java
+++ b/apps/test/demo/src/main/java/org/onosproject/demo/DemoResource.java
@@ -56,6 +56,24 @@
     }
 
     /**
+     * Start the flow objective test.
+     *
+     * @param input JSON describing how to run the flow objective test
+     * @return response code OK
+     * @throws IOException if the JSON processing fails
+     */
+    @POST
+    @Path("flowObjTest")
+    @Consumes(MediaType.APPLICATION_JSON)
+    @Produces(MediaType.APPLICATION_JSON)
+    public Response flowObjTest(InputStream input) throws IOException {
+        ObjectMapper mapper = new ObjectMapper();
+        JsonNode cfg = mapper.readTree(input);
+        DemoApi demo = get(DemoApi.class);
+        return Response.ok(demo.flowObjTest(Optional.ofNullable(cfg)).toString()).build();
+    }
+
+    /**
      * Set up the flow test.
      *
      * @param input JSON describing how to configure the flow test