aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--asdctool/pom.xml6
-rw-r--r--catalog-be/pom.xml4
-rw-r--r--catalog-model/pom.xml12
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml18
-rw-r--r--openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml18
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml18
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImpl.java12
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogDaoStub.java (renamed from openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogDaoStub.java)0
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImplTest.java (renamed from openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImplTest.java)34
-rw-r--r--openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImplTest.java (renamed from openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImplTest.java)14
-rw-r--r--openecomp-be/backend/openecomp-sdc-security-util/pom.xml19
-rw-r--r--openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/pom.xml18
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml13
-rw-r--r--openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/pom.xml18
-rw-r--r--openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/pom.xml6
-rw-r--r--pom.xml1
16 files changed, 18 insertions, 193 deletions
diff --git a/asdctool/pom.xml b/asdctool/pom.xml
index e6ff5c6221..b685620bab 100644
--- a/asdctool/pom.xml
+++ b/asdctool/pom.xml
@@ -506,12 +506,6 @@
<groupId>io.netty</groupId>
<artifactId>netty-handler</artifactId>
</dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
diff --git a/catalog-be/pom.xml b/catalog-be/pom.xml
index a74d594ce8..7f34e15c56 100644
--- a/catalog-be/pom.xml
+++ b/catalog-be/pom.xml
@@ -465,10 +465,6 @@
<groupId>org.slf4j</groupId>
</exclusion>
<exclusion>
- <artifactId>powermock-api-mockito</artifactId>
- <groupId>org.powermock</groupId>
- </exclusion>
- <exclusion>
<groupId>org.onap.aaf.authz</groupId>
<artifactId>aaf-cadi-aaf</artifactId>
</exclusion>
diff --git a/catalog-model/pom.xml b/catalog-model/pom.xml
index 5fd10f7316..051313602f 100644
--- a/catalog-model/pom.xml
+++ b/catalog-model/pom.xml
@@ -281,18 +281,6 @@
<version>${commons-jci-core.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito-common</artifactId>
- <version>1.7.4</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml
index 036a072659..184ed4cd76 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/externaltesting-rest/externaltesting-rest-services/pom.xml
@@ -129,24 +129,6 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4-common</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito2</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.openecomp.sdc</groupId>
<artifactId>openecomp-sdc-externaltesting-impl</artifactId>
<version>${project.version}</version>
diff --git a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml
index 1c4e61d406..6cd5727baa 100644
--- a/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml
+++ b/openecomp-be/api/openecomp-sdc-rest-webapp/vendor-software-products-rest/vendor-software-products-rest-services/pom.xml
@@ -136,24 +136,6 @@
<artifactId>unique-type-rest-types</artifactId>
<version>${project.version}</version>
</dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4-common</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito2</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml
index 5dd93c33f4..ca548b44e5 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/pom.xml
@@ -46,24 +46,6 @@
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4-common</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito2</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImpl.java b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImpl.java
index 82d5ae10d7..c1dd5d0a75 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImpl.java
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImpl.java
@@ -20,8 +20,16 @@ import org.openecomp.sdc.activitylog.ActivityLogManagerFactory;
import org.openecomp.sdc.activitylog.dao.ActivityLogDaoFactory;
public class ActivityLogManagerFactoryImpl extends ActivityLogManagerFactory {
- private static final ActivityLogManager INSTANCE =
- new ActivityLogManagerImpl(ActivityLogDaoFactory.getInstance().createInterface());
+ private final ActivityLogManager INSTANCE;
+
+
+ public ActivityLogManagerFactoryImpl() {
+ this.INSTANCE = new ActivityLogManagerImpl(ActivityLogDaoFactory.getInstance().createInterface());
+ }
+
+ ActivityLogManagerFactoryImpl(ActivityLogManager activityLogManager) {
+ this.INSTANCE = activityLogManager;
+ }
@Override
public ActivityLogManager createInterface() {
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogDaoStub.java b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogDaoStub.java
index 4f311775bc..4f311775bc 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogDaoStub.java
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogDaoStub.java
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImplTest.java b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImplTest.java
index c00bcc3b54..4784d54862 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImplTest.java
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerFactoryImplTest.java
@@ -20,42 +20,18 @@
package org.openecomp.sdc.activitylog.impl;
-import org.junit.Before;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.mockito.Mock;
+import org.junit.jupiter.api.Test;
+import static org.mockito.Mockito.mock;
import org.openecomp.sdc.activitylog.ActivityLogManager;
-import org.openecomp.sdc.activitylog.dao.ActivityLogDao;
-import org.openecomp.sdc.activitylog.dao.ActivityLogDaoFactory;
-import org.powermock.api.mockito.PowerMockito;
-import org.powermock.core.classloader.annotations.PrepareForTest;
-import org.powermock.modules.junit4.PowerMockRunner;
-import static org.junit.Assert.assertNotNull;
-import static org.mockito.MockitoAnnotations.initMocks;
-import static org.powermock.api.mockito.PowerMockito.when;
+import static org.junit.jupiter.api.Assertions.assertNotNull;
-@RunWith(PowerMockRunner.class)
-@PrepareForTest(ActivityLogDaoFactory.class)
public class ActivityLogManagerFactoryImplTest {
- @Mock
- ActivityLogDaoFactory activityLogDaoFactory;
- @Mock
- ActivityLogDao activityLogDao;
-
- @Before
- public void setUp(){
- initMocks(this);
- PowerMockito.mockStatic(ActivityLogDaoFactory.class);
- when(ActivityLogDaoFactory.getInstance()).thenReturn(activityLogDaoFactory);
- when(activityLogDaoFactory.createInterface()).thenReturn(activityLogDao);
-
- }
-
@Test
public void createInterfaceTest(){
- ActivityLogManager activityLogManager = new ActivityLogManagerFactoryImpl().createInterface();
+ ActivityLogManager activityLogManager =
+ new ActivityLogManagerFactoryImpl(mock(ActivityLogManager.class)).createInterface();
assertNotNull(activityLogManager);
}
}
diff --git a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImplTest.java b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImplTest.java
index 0ce6098c61..44a4b20cc9 100644
--- a/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/main/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImplTest.java
+++ b/openecomp-be/backend/openecomp-sdc-activity-log-manager/src/test/java/org/openecomp/sdc/activitylog/impl/ActivityLogManagerImplTest.java
@@ -20,9 +20,8 @@
package org.openecomp.sdc.activitylog.impl;
-import org.junit.Before;
-import org.junit.Test;
-import org.mockito.Mock;
+import org.junit.jupiter.api.Test;
+import org.mockito.Mockito;
import org.openecomp.sdc.activitylog.dao.type.ActivityLogEntity;
import org.openecomp.sdc.versioning.dao.types.Version;
@@ -33,18 +32,11 @@ import static org.mockito.ArgumentMatchers.any;
import static org.mockito.Mockito.times;
import static org.mockito.Mockito.verify;
import static org.mockito.Mockito.when;
-import static org.mockito.MockitoAnnotations.initMocks;
public class ActivityLogManagerImplTest {
private ActivityLogManagerImpl activityLogManager;
- @Mock
- private ActivityLogDaoStub activityLogDao;
-
- @Before
- public void setUp(){
- initMocks(this);
- }
+ private ActivityLogDaoStub activityLogDao = Mockito.mock(ActivityLogDaoStub.class);
@Test
public void logActivityTest(){
diff --git a/openecomp-be/backend/openecomp-sdc-security-util/pom.xml b/openecomp-be/backend/openecomp-sdc-security-util/pom.xml
index dc114db09f..d9370ac6af 100644
--- a/openecomp-be/backend/openecomp-sdc-security-util/pom.xml
+++ b/openecomp-be/backend/openecomp-sdc-security-util/pom.xml
@@ -62,25 +62,6 @@
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito2</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
diff --git a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/pom.xml b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/pom.xml
index 26030edc44..7b23506bac 100644
--- a/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/pom.xml
+++ b/openecomp-be/backend/openecomp-sdc-vendor-software-product-manager/pom.xml
@@ -161,24 +161,6 @@
<version>${project.version}</version>
</dependency>
<dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4-common</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito2</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
<groupId>org.openecomp.sdc</groupId>
<artifactId>openecomp-sdc-activity-log-api</artifactId>
<version>${project.version}</version>
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml
index c87b3e5c56..8daff53abe 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-api/pom.xml
@@ -26,19 +26,6 @@
<version>${servlet-api.version}</version>
<scope>provided</scope>
</dependency>
- <!-- testing -->
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-mockito2</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
diff --git a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/pom.xml b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/pom.xml
index 4a324b1dd2..938787c202 100644
--- a/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-logging-lib/openecomp-sdc-logging-core/pom.xml
@@ -34,24 +34,6 @@
<version>${easymock.version}</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-api-easymock</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-core</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/pom.xml b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/pom.xml
index 3a8413a219..15b3a6a21c 100644
--- a/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/pom.xml
+++ b/openecomp-be/lib/openecomp-sdc-notification-lib/openecomp-sdc-notification-core/pom.xml
@@ -40,12 +40,6 @@
<artifactId>mockito-core</artifactId>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.powermock</groupId>
- <artifactId>powermock-module-junit4</artifactId>
- <version>${powermock.version}</version>
- <scope>test</scope>
- </dependency>
</dependencies>
</project>
diff --git a/pom.xml b/pom.xml
index c7e972ac53..798ab3aabc 100644
--- a/pom.xml
+++ b/pom.xml
@@ -106,7 +106,6 @@ Modifications copyright (c) 2018-2019 Nokia
<commons-jci-core.version>1.1</commons-jci-core.version>
<!--TESTING-->
- <powermock.version>2.0.7</powermock.version>
<mockito.version>3.3.3</mockito.version>
<mockitoJupiter.version>3.3.3</mockitoJupiter.version>
<jmockit.version>1.35</jmockit.version>