aboutsummaryrefslogtreecommitdiffstats
path: root/bpmn/so-bpmn-tasks/src/test
diff options
context:
space:
mode:
authorGamboa, Gilbert <gilbert.g.gamboa@att.com>2019-08-30 13:02:22 -0400
committerBenjamin, Max (mb388a) <mb388a@att.com>2019-08-30 13:02:22 -0400
commitbaeca07d02b3cd3d22cb4da8973cdd0b71ae0d43 (patch)
tree96bfda9a5610ede1c0458f5f76d4c82d364cb4fe /bpmn/so-bpmn-tasks/src/test
parent687cdacb9fd74629e94ebc0914ba8c72bb5015a5 (diff)
fix create call to A&AI
createIfNotExists should be used rather than create Issue-ID: SO-2269 Signed-off-by: Benjamin, Max (mb388a) <mb388a@att.com> Change-Id: I03af6a83460acbb1d7bde01f108d2a5a03d05adf
Diffstat (limited to 'bpmn/so-bpmn-tasks/src/test')
-rw-r--r--bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
index 68f3d20c82..9855c8587a 100644
--- a/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
+++ b/bpmn/so-bpmn-tasks/src/test/java/org/onap/so/client/orchestration/AAIConfigurationResourcesTest.java
@@ -96,14 +96,12 @@ public class AAIConfigurationResourcesTest extends TestDataSetup {
public void createConfigurationTest() {
doReturn(new org.onap.aai.domain.yang.Configuration()).when(MOCK_aaiObjectMapper)
.mapConfiguration(configuration);
- doNothing().when(MOCK_aaiResourcesClient).create(isA(AAIResourceUri.class),
- isA(org.onap.aai.domain.yang.Configuration.class));
-
+ doReturn(MOCK_aaiResourcesClient).when(MOCK_aaiResourcesClient).createIfNotExists(isA(AAIResourceUri.class),
+ any(Optional.class));
aaiConfigurationResources.createConfiguration(configuration);
assertEquals(OrchestrationStatus.INVENTORIED, configuration.getOrchestrationStatus());
- verify(MOCK_aaiResourcesClient, times(1)).create(any(AAIResourceUri.class),
- isA(org.onap.aai.domain.yang.Configuration.class));
+ verify(MOCK_aaiResourcesClient, times(1)).createIfNotExists(any(AAIResourceUri.class), any(Optional.class));
}
@Test