Fix Modify NSSI operation
[policy/models.git] / models-interactions / model-actors / actor.so / src / test / java / org / onap / policy / controlloop / actor / so / ModifyNssiTest.java
index 21d7229..2d290d6 100644 (file)
@@ -3,6 +3,7 @@
  * ONAP
  * ================================================================================
  * Copyright (C) 2020 Wipro Limited.
+ * Modifications Copyright (C) 2020 AT&T Intellectual Property. All rights reserved.
  * ================================================================================
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -77,7 +78,7 @@ public class ModifyNssiTest extends BasicSoOperation {
         params = params.toBuilder().retry(0).timeoutSec(5).executor(blockingExecutor).build();
 
         oper = new ModifyNssi(params, config);
-
+        oper.setProperty(OperationProperties.EVENT_PAYLOAD, getPayload());
         outcome = oper.start().get();
 
         assertEquals(OperationResult.SUCCESS, outcome.getResult());
@@ -99,19 +100,13 @@ public class ModifyNssiTest extends BasicSoOperation {
     public void testGetPropertyNames() {
         assertThat(oper.getPropertyNames()).isEqualTo(
                 List.of(
-                        OperationProperties.AAI_SERVICE,
                         OperationProperties.EVENT_PAYLOAD));
     }
 
-    @Override
-    protected Map<String, Object> makePayload() {
-        String payloadString = ResourceUtils
+    private String getPayload() {
+        return ResourceUtils
                 .getResourceAsString("src/test/resources/ModifyNSSI.json");
-
-        try {
-            return coder.decode(payloadString, Map.class);
-        } catch (CoderException e) {
-            throw new IllegalArgumentException("invalid payload value: " + payloadString, e);
-        }
     }
+
+
 }