ONOS-2144 - Complete implementation of REST API for flows

- URL for creation of a single flow is now /flows/{deviceId}
- On successful creation of a flow, Location header contains
  a reference to the new object's URI
- POST operation returns status code of CREATED
- implement DELETE operation for /flows/{deviceId}/{flowId}
- removed deprecations and warnings from REST API unit
  test for flows.

Change-Id: Idb43a651a659e60c07a6f36dfd69004c814b146b
diff --git a/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java b/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
index 5eaa20e..2e0e8b3 100644
--- a/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
+++ b/core/common/src/test/java/org/onosproject/codec/impl/FlowRuleCodecTest.java
@@ -97,7 +97,7 @@
         flowRuleCodec = context.codec(FlowRule.class);
         assertThat(flowRuleCodec, notNullValue());
 
-        expect(mockCoreService.getAppId(APP_ID.id()))
+        expect(mockCoreService.registerApplication(FlowRuleCodec.REST_APP_ID))
                 .andReturn(APP_ID).anyTimes();
         replay(mockCoreService);
         context.registerService(CoreService.class, mockCoreService);
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/criteria-flow.json b/core/common/src/test/resources/org/onosproject/codec/impl/criteria-flow.json
index 6df4d0a..7061820 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/criteria-flow.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/criteria-flow.json
@@ -1,5 +1,4 @@
 {
-  "appId":-29467,
   "priority":1,
   "isPermanent":"false",
   "timeout":1,
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json b/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
index d60362d..a57731b 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/instructions-flow.json
@@ -1,5 +1,4 @@
 {
-  "appId":-29467,
   "priority":1,
   "isPermanent":"false",
   "timeout":1,
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/sigid-flow.json b/core/common/src/test/resources/org/onosproject/codec/impl/sigid-flow.json
index ba576bf..49d6b1c 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/sigid-flow.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/sigid-flow.json
@@ -1,5 +1,4 @@
 {
-  "appId":-29467,
   "priority":1,
   "isPermanent":"false",
   "timeout":1,
diff --git a/core/common/src/test/resources/org/onosproject/codec/impl/simple-flow.json b/core/common/src/test/resources/org/onosproject/codec/impl/simple-flow.json
index 4011c2d..dc241f5 100644
--- a/core/common/src/test/resources/org/onosproject/codec/impl/simple-flow.json
+++ b/core/common/src/test/resources/org/onosproject/codec/impl/simple-flow.json
@@ -1,5 +1,4 @@
 {
-   "appId":-29467,
    "priority":1,
    "isPermanent":"false",
    "timeout":1,