summaryrefslogtreecommitdiffstats
path: root/openecomp-be
diff options
context:
space:
mode:
Diffstat (limited to 'openecomp-be')
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml5
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/test/java/org/openecomp/sdcrests/action/rest/services/ActionsImplTest.java34
-rw-r--r--openecomp-be/backend/openecomp-sdc-action-manager/pom.xml5
-rw-r--r--openecomp-be/lib/openecomp-heat-lib/pom.xml5
4 files changed, 32 insertions, 17 deletions
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml
index df4196a81f..bd1a9af8f7 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/pom.xml
@@ -115,6 +115,11 @@
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/test/java/org/openecomp/sdcrests/action/rest/services/ActionsImplTest.java b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/test/java/org/openecomp/sdcrests/action/rest/services/ActionsImplTest.java
index 6fef074730..271a888bca 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/test/java/org/openecomp/sdcrests/action/rest/services/ActionsImplTest.java
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/action-library-rest/action-library-rest-services/src/test/java/org/openecomp/sdcrests/action/rest/services/ActionsImplTest.java
@@ -19,6 +19,22 @@
package org.openecomp.sdcrests.action.rest.services;
+import static org.mockito.ArgumentMatchers.any;
+import static org.mockito.ArgumentMatchers.anyString;
+import static org.mockito.Mockito.times;
+import static org.mockito.Mockito.when;
+import static org.openecomp.sdc.action.ActionConstants.X_OPEN_ECOMP_INSTANCE_ID_HEADER_PARAM;
+import static org.openecomp.sdc.action.ActionConstants.X_OPEN_ECOMP_REQUEST_ID_HEADER_PARAM;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.util.ArrayList;
+import java.util.Date;
+import java.util.List;
+import javax.activation.DataHandler;
+import javax.activation.DataSource;
+import javax.servlet.http.HttpServletRequest;
+import javax.ws.rs.core.Response;
import org.apache.cxf.attachment.AttachmentDataSource;
import org.apache.cxf.jaxrs.ext.multipart.Attachment;
import org.junit.Assert;
@@ -35,23 +51,6 @@ import org.openecomp.sdc.action.types.ActionArtifact;
import org.openecomp.sdc.action.types.ActionStatus;
import org.openecomp.sdc.action.types.OpenEcompComponent;
-import javax.activation.DataHandler;
-import javax.activation.DataSource;
-import javax.servlet.http.HttpServletRequest;
-import javax.ws.rs.core.Response;
-import java.io.ByteArrayInputStream;
-import java.io.IOException;
-import java.util.ArrayList;
-import java.util.Date;
-import java.util.List;
-
-import static org.mockito.Matchers.any;
-import static org.mockito.Matchers.anyString;
-import static org.mockito.Mockito.times;
-import static org.mockito.Mockito.when;
-import static org.openecomp.sdc.action.ActionConstants.X_OPEN_ECOMP_INSTANCE_ID_HEADER_PARAM;
-import static org.openecomp.sdc.action.ActionConstants.X_OPEN_ECOMP_REQUEST_ID_HEADER_PARAM;
-
public class ActionsImplTest {
@Mock
@@ -64,6 +63,7 @@ public class ActionsImplTest {
@Before
public void init() {
MockitoAnnotations.initMocks(this);
+ when(request.getRemoteUser()).thenReturn("unit-test-user");
when(request.getHeader(X_OPEN_ECOMP_INSTANCE_ID_HEADER_PARAM)).thenReturn("X-OPEN-ECOMP-InstanceID");
when(request.getHeader(X_OPEN_ECOMP_REQUEST_ID_HEADER_PARAM)).thenReturn("X-OPEN-ECOMP-RequestID");
}
diff --git a/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml
index 682c018d19..5aa410efab 100644
--- a/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml
+++ b/openecomp-be/backend/openecomp-sdc-action-manager/pom.xml
@@ -73,6 +73,11 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>
diff --git a/openecomp-be/lib/openecomp-heat-lib/pom.xml b/openecomp-be/lib/openecomp-heat-lib/pom.xml
index a710435260..1d162ad75e 100644
--- a/openecomp-be/lib/openecomp-heat-lib/pom.xml
+++ b/openecomp-be/lib/openecomp-heat-lib/pom.xml
@@ -59,6 +59,11 @@
<artifactId>openecomp-sdc-validation-api</artifactId>
<version>${project.version}</version>
</dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <scope>test</scope>
+ </dependency>
</dependencies>