diff options
author | Steve Smokowski <ss835w@att.com> | 2019-09-04 12:13:24 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@onap.org> | 2019-09-04 12:13:24 +0000 |
commit | 10e989e4a8b5ce9d28bd59c1915a7064782691f3 (patch) | |
tree | e42a9eb62440fe44667ab37fa0c4520ebd6dc2bd /bpmn/so-bpmn-tasks/src/test | |
parent | fad4948ac2e086e304b399800808fcbd7702e6fb (diff) | |
parent | baeca07d02b3cd3d22cb4da8973cdd0b71ae0d43 (diff) |
Merge "fix create call to A&AI"
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.java | 8 |
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 |