- .thenReturn(Either.left(null));
- when(resourceBusinessLogic
- .createOrUpdateResourceByImport(any(Resource.class), any(User.class), eq(true), eq(true), eq(false), eq(null), eq(null), eq(false)))
- .thenReturn(new ImmutablePair<>(new Resource(), ActionStatus.OK)).thenReturn(new ImmutablePair<>(new Resource(), ActionStatus.OK));
+ .thenReturn(Either.left(null));
+ when(toscaOperationFacade.getLatestByToscaResourceName("tosca.nodes.nfv.NS", ""))
+ .thenReturn(Either.left(createResourceNS()));
+ when(toscaOperationFacade.getLatestByToscaResourceName("org.openecomp.service.Etsiwithchild", ""))
+ .thenReturn(Either.right(null));
+ when(resourceBusinessLogic.createOrUpdateResourceByImport(any(Resource.class), any(User.class), eq(true), eq(true), eq(false), eq(null),
+ eq(null), eq(false))).thenReturn(new ImmutablePair<>(new Resource(), ActionStatus.OK))
+ .thenReturn(new ImmutablePair<>(new Resource(), ActionStatus.OK));
+ when(responseFormatManager.getResponseFormat(ActionStatus.GENERAL_ERROR)).thenReturn(mock(ResponseFormat.class));