Changes to support ODL Sulfur update
[sdnc/northbound.git] / generic-resource-api / provider / src / test / java / org / onap / sdnc / northbound / PolicyUpdateNotifyOperationRPCTest.java
index b73bd11..3c6222f 100644 (file)
@@ -25,7 +25,7 @@ public class PolicyUpdateNotifyOperationRPCTest extends GenericResourceApiProvid
     @Test
     public void should_fail_when_invalid_vnf_topology() throws Exception {
 
-        PolicyUpdateNotifyOperationInput input = build(PolicyUpdateNotifyOperationInput());
+        PolicyUpdateNotifyOperationInput input = PolicyUpdateNotifyOperationInput().build();
 
         PolicyUpdateNotifyOperationOutput output =
                 exec(genericResourceApiProvider::policyUpdateNotifyOperation, input, RpcResult::getResult);
@@ -33,4 +33,16 @@ public class PolicyUpdateNotifyOperationRPCTest extends GenericResourceApiProvid
         assertEquals("404", output.getErrorCode());
         assertEquals("Invalid input, missing input data", output.getErrorMsg());
     }
+
+    @Test
+    public void should_fail_when_valid_vnf_topology() throws Exception {
+
+        PolicyUpdateNotifyOperationInput input = PolicyUpdateNotifyOperationInput().setPolicyName("PolicyName").setUpdateType("UpdateType").setVersionId("vID").build();
+
+        PolicyUpdateNotifyOperationOutput output =
+                exec(genericResourceApiProvider::policyUpdateNotifyOperation, input, RpcResult::getResult);
+
+        assertEquals("503", output.getErrorCode());
+        assertEquals("No service logic active for generic-resource-api: 'policy-update-notify-operation'", output.getErrorMsg());
+    }
 }