Merge "Junit Test Case Added for AAIClientCallFailed.java"
[so.git] / bpmn / so-bpmn-infrastructure-common / src / test / java / org / onap / so / bpmn / infrastructure / pnf / delegate / CreatePnfEntryInAaiDelegateTest.java
index 6bfbac0..986edfe 100644 (file)
@@ -25,7 +25,7 @@ import static org.assertj.core.api.Assertions.assertThat;
 import static org.mockito.BDDMockito.given;
 import static org.mockito.ArgumentMatchers.eq;
 import static org.mockito.Mockito.mock;
-import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.CORRELATION_ID;
+import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_CORRELATION_ID;
 import static org.onap.so.bpmn.infrastructure.pnf.delegate.ExecutionVariableNames.PNF_UUID;
 
 import java.util.UUID;
@@ -40,17 +40,17 @@ public class CreatePnfEntryInAaiDelegateTest {
         // given
         String pnfUuid = UUID.nameUUIDFromBytes("testUuid".getBytes()).toString();
         CreatePnfEntryInAaiDelegate delegate = new CreatePnfEntryInAaiDelegate();
-        AaiConnectionTestImpl aaiConnection = new AaiConnectionTestImpl();
-        delegate.setAaiConnection(aaiConnection);
+        PnfManagementTestImpl pnfManagementTest = new PnfManagementTestImpl();
+        delegate.setPnfManagement(pnfManagementTest);
         DelegateExecution execution = mock(DelegateExecution.class);
-        given(execution.getVariable(eq(CORRELATION_ID))).willReturn("testCorrelationId");
+        given(execution.getVariable(eq(PNF_CORRELATION_ID))).willReturn("testPnfCorrelationId");
         given(execution.getVariable(eq(PNF_UUID))).willReturn(pnfUuid);
         // when
         delegate.execute(execution);
         // then
-        Pnf createdEntry = aaiConnection.getCreated().get("testCorrelationId");
+        Pnf createdEntry = pnfManagementTest.getCreated().get("testPnfCorrelationId");
         assertThat(createdEntry.getPnfId()).isEqualTo(pnfUuid);
-        assertThat(createdEntry.getPnfName()).isEqualTo("testCorrelationId");
+        assertThat(createdEntry.getPnfName()).isEqualTo("testPnfCorrelationId");
         assertThat(createdEntry.isInMaint()).isNull();
     }
-}
\ No newline at end of file
+}