diff options
author | ChrisC <christophe.closset@intl.att.com> | 2021-04-29 16:39:26 +0200 |
---|---|---|
committer | ChrisC <christophe.closset@intl.att.com> | 2021-04-30 09:00:03 +0200 |
commit | b5e34936cc893a3e0dad93f33b1864e7c8fe1cac (patch) | |
tree | 6144fe61c2d4ea51a10659205afa69fd485033c6 | |
parent | 414bc934cd53ab76cc63a6436478566d9a6163d7 (diff) |
Vulnerable packages update
Update SDC-BE-COMMON to new version 1.6.1
Update several packages to the seccom recommended version
updated tests to JUNIT5
Issue-ID: SDC-3572
Signed-off-by: ChrisC <christophe.closset@intl.att.com>
Change-Id: Ibf26663aac0e3de6a36df4c723baa963206cc1b7
30 files changed, 223 insertions, 165 deletions
@@ -31,7 +31,7 @@ <groupId>org.onap.sdc.sdc-be-common</groupId> <artifactId>sdc-be-common-parent</artifactId> <name>sdc-be-common</name> - <version>1.6.0-SNAPSHOT</version> + <version>1.6.1-SNAPSHOT</version> <packaging>pom</packaging> <properties> @@ -40,7 +40,7 @@ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> <mockito.version>2.23.4</mockito.version> - <junit.jupiter.version>5.6.0</junit.jupiter.version> + <junit.jupiter.version>5.7.1</junit.jupiter.version> <logging-slf4j.version>1.5.0</logging-slf4j.version> <maven-checkstyle-plugin.version>2.17</maven-checkstyle-plugin.version> <snapshots.path>snapshots</snapshots.path> @@ -84,7 +84,7 @@ <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-dependencies</artifactId> - <version>2.1.5.RELEASE</version> + <version>2.1.18.RELEASE</version> <type>pom</type> <scope>import</scope> </dependency> @@ -96,6 +96,12 @@ <groupId>org.onap.logging-analytics</groupId> <artifactId>logging-slf4j</artifactId> <version>${logging-slf4j.version}</version> + <exclusions> + <exclusion> + <groupId>org.powermock</groupId> + <artifactId>powermock-module-junit4</artifactId> + </exclusion> + </exclusions> </dependency> <dependency> <groupId>org.springframework.boot</groupId> @@ -103,6 +109,12 @@ </dependency> <dependency> <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + <version>${junit.jupiter.version}</version> + <scope>test</scope> + </dependency> + <dependency> + <groupId>org.junit.jupiter</groupId> <artifactId>junit-jupiter</artifactId> <version>${junit.jupiter.version}</version> <scope>test</scope> diff --git a/security-util-lib/pom.xml b/security-util-lib/pom.xml index 5b07389..020e7c1 100644 --- a/security-util-lib/pom.xml +++ b/security-util-lib/pom.xml @@ -8,7 +8,7 @@ <parent> <groupId>org.onap.sdc.sdc-be-common</groupId> <artifactId>sdc-be-common-parent</artifactId> - <version>1.6.0-SNAPSHOT</version> + <version>1.6.1-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> @@ -19,11 +19,13 @@ <!-- Nexus related properties --> <portal.version>2.5.0</portal.version> <lang3.version>3.3.2</lang3.version> - <guava.version>18.0</guava.version> - <httpclient.version>4.5.3</httpclient.version> + <guava.version>30.1.1-jre</guava.version> + <httpclient.version>4.5.13</httpclient.version> <jersey-bom.version>2.27</jersey-bom.version> <json-simple.version>1.1</json-simple.version> <functionaljava.version>4.7</functionaljava.version> + <jackson.version>2.12.3</jackson.version> + <esapi.version>2.2.3.0</esapi.version> <!-- Sonar properties --> <sonar.sourceEncoding>${project.build.sourceEncoding}</sonar.sourceEncoding> @@ -38,12 +40,37 @@ </properties> <dependencies> - + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + <version>${jackson.version}</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + <version>${jackson.version}</version> + </dependency> + <dependency> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + <version>${jackson.version}</version> + </dependency> <dependency> <groupId>org.functionaljava</groupId> <artifactId>functionaljava</artifactId> <version>${functionaljava.version}</version> </dependency> + <dependency> + <groupId>org.owasp.esapi</groupId> + <artifactId>esapi</artifactId> + <version>${esapi.version}</version> + <exclusions> + <exclusion> + <groupId>org.slf4j</groupId> + <artifactId>slf4j-simple</artifactId> + </exclusion> + </exclusions> + </dependency> <!-- Inserted for Portal Integration --> <dependency> @@ -57,14 +84,34 @@ <artifactId>cambriaClient</artifactId> </exclusion> <exclusion> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-core</artifactId> + </exclusion> + <exclusion> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-annotations</artifactId> + </exclusion> + <exclusion> + <groupId>com.fasterxml.jackson.core</groupId> + <artifactId>jackson-databind</artifactId> + </exclusion> + <exclusion> + <groupId>org.owasp.esapi</groupId> + <artifactId>esapi</artifactId> + </exclusion> + <exclusion> <artifactId>slf4j-log4j12</artifactId> <groupId>org.slf4j</groupId> </exclusion> <exclusion> - <artifactId>powermock-api-mockito</artifactId> + <artifactId>powermock-module-junit4</artifactId> <groupId>org.powermock</groupId> </exclusion> <exclusion> + <groupId>org.junit.jupiter</groupId> + <artifactId>junit-jupiter-api</artifactId> + </exclusion> + <exclusion> <groupId> org.onap.aaf.authz</groupId> <artifactId> aaf-cadi-aaf</artifactId> </exclusion> @@ -121,7 +168,7 @@ <plugin> <groupId>org.jacoco</groupId> <artifactId>jacoco-maven-plugin</artifactId> - <version>0.7.8</version> + <version>0.8.6</version> <executions> <!-- Unit-Tests --> <execution> diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/AuthenticationCookieUtilsTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/AuthenticationCookieUtilsTest.java index 900afe2..0460a90 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/AuthenticationCookieUtilsTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/AuthenticationCookieUtilsTest.java @@ -20,8 +20,8 @@ package org.onap.sdc.security; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.io.IOException; import java.util.concurrent.TimeUnit; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/CipherUtilTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/CipherUtilTest.java index e8d57a1..379bbea 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/CipherUtilTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/CipherUtilTest.java @@ -20,8 +20,8 @@ package org.onap.sdc.security; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import org.apache.commons.codec.binary.Base64; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/PasswordsTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/PasswordsTest.java index ff5d0f1..a390275 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/PasswordsTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/PasswordsTest.java @@ -20,10 +20,10 @@ package org.onap.sdc.security; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotEquals; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import org.junit.jupiter.api.Test; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/RepresentationUtilsTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/RepresentationUtilsTest.java index a5a37d7..0ae2e2c 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/RepresentationUtilsTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/RepresentationUtilsTest.java @@ -20,7 +20,7 @@ package org.onap.sdc.security; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import java.io.IOException; import java.util.HashSet; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/RestUtilsTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/RestUtilsTest.java index a55b45d..82adc59 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/RestUtilsTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/RestUtilsTest.java @@ -20,10 +20,10 @@ package org.onap.sdc.security; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import java.util.Properties; import org.apache.http.HttpHeaders; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/SecurityUtilTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/SecurityUtilTest.java index 67361a9..6176355 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/SecurityUtilTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/SecurityUtilTest.java @@ -20,8 +20,8 @@ package org.onap.sdc.security; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotEquals; import java.util.Base64; import org.junit.jupiter.api.Test; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/filters/RestrictionAccessFilterTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/filters/RestrictionAccessFilterTest.java index 6fe7926..9e17340 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/filters/RestrictionAccessFilterTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/filters/RestrictionAccessFilterTest.java @@ -20,9 +20,9 @@ package org.onap.sdc.security.filters; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.spy; import static org.mockito.Mockito.when; @@ -61,7 +61,7 @@ public class RestrictionAccessFilterTest { } private void mockCreateFilter(ISessionValidationFilterConfiguration sessionConfig, - IUsersThreadLocalHolder threadLocalUtils, PortalClient portalClient) { + IUsersThreadLocalHolder threadLocalUtils, PortalClient portalClient) { filter = new RestrictionAccessFilter(sessionConfig, threadLocalUtils, portalClient); } @@ -209,5 +209,4 @@ public class RestrictionAccessFilterTest { ); } - } diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/filters/SessionValidationFilterTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/filters/SessionValidationFilterTest.java index c92d086..413fe00 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/filters/SessionValidationFilterTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/filters/SessionValidationFilterTest.java @@ -30,20 +30,19 @@ import javax.servlet.ServletException; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; -import org.junit.FixMethodOrder; import org.junit.jupiter.api.BeforeEach; +import org.junit.jupiter.api.MethodOrderer; import org.junit.jupiter.api.Test; -import org.junit.runners.MethodSorters; +import org.junit.jupiter.api.TestMethodOrder; import org.mockito.Mockito; import org.onap.sdc.security.AuthenticationCookie; import org.onap.sdc.security.AuthenticationCookieUtils; import org.onap.sdc.security.CipherUtilException; import org.onap.sdc.security.RepresentationUtils; -@FixMethodOrder(MethodSorters.NAME_ASCENDING) +@TestMethodOrder(MethodOrderer.Alphanumeric.class) public class SessionValidationFilterTest { - private final HttpServletRequest request = Mockito.mock(HttpServletRequest.class); private final HttpServletResponse response = Mockito.spy(HttpServletResponse.class); @@ -247,4 +246,4 @@ public class SessionValidationFilterTest { sessionValidationFilter.setSecurityKey(oldKey); } -}
\ No newline at end of file +} diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/logging/elements/LogFieldsMdcHandlerTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/logging/elements/LogFieldsMdcHandlerTest.java index ea1f6b7..fe5a366 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/logging/elements/LogFieldsMdcHandlerTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/logging/elements/LogFieldsMdcHandlerTest.java @@ -14,10 +14,10 @@ */ package org.onap.sdc.security.logging.elements; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.any; import static org.mockito.Mockito.anyInt; import static org.mockito.Mockito.anyString; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/EcompLoggerErrorCodeTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/EcompLoggerErrorCodeTest.java index 2522c11..0a4eb4d 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/EcompLoggerErrorCodeTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/EcompLoggerErrorCodeTest.java @@ -23,7 +23,7 @@ package org.onap.sdc.security.logging.enums; -import org.junit.Assert; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; public class EcompLoggerErrorCodeTest { @@ -32,19 +32,19 @@ public class EcompLoggerErrorCodeTest { public void getByValueTest() { EcompLoggerErrorCode ecompLoggerErrorCode = EcompLoggerErrorCode.getByValue("E_0"); - Assert.assertEquals(0, ecompLoggerErrorCode.getErrorCode()); + assertEquals(0, ecompLoggerErrorCode.getErrorCode()); ecompLoggerErrorCode = EcompLoggerErrorCode.getByValue("E_100"); - Assert.assertEquals(100, ecompLoggerErrorCode.getErrorCode()); + assertEquals(100, ecompLoggerErrorCode.getErrorCode()); ecompLoggerErrorCode = EcompLoggerErrorCode.getByValue("E_200"); - Assert.assertEquals(200, ecompLoggerErrorCode.getErrorCode()); + assertEquals(200, ecompLoggerErrorCode.getErrorCode()); ecompLoggerErrorCode = EcompLoggerErrorCode.getByValue("E_300"); - Assert.assertEquals(300, ecompLoggerErrorCode.getErrorCode()); + assertEquals(300, ecompLoggerErrorCode.getErrorCode()); ecompLoggerErrorCode = EcompLoggerErrorCode.getByValue("E_400"); - Assert.assertEquals(400, ecompLoggerErrorCode.getErrorCode()); + assertEquals(400, ecompLoggerErrorCode.getErrorCode()); ecompLoggerErrorCode = EcompLoggerErrorCode.getByValue("E_500"); - Assert.assertEquals(500, ecompLoggerErrorCode.getErrorCode()); + assertEquals(500, ecompLoggerErrorCode.getErrorCode()); ecompLoggerErrorCode = EcompLoggerErrorCode.getByValue("none"); - Assert.assertEquals(900, ecompLoggerErrorCode.getErrorCode()); + assertEquals(900, ecompLoggerErrorCode.getErrorCode()); } diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/LoggerSupportabilityActionsTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/LoggerSupportabilityActionsTest.java index b36ad72..0cbc34d 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/LoggerSupportabilityActionsTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/LoggerSupportabilityActionsTest.java @@ -21,7 +21,7 @@ */ package org.onap.sdc.security.logging.enums; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/SeverityTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/SeverityTest.java index dff7665..23926cb 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/SeverityTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/SeverityTest.java @@ -22,7 +22,7 @@ package org.onap.sdc.security.logging.enums; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/StatusCodeTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/StatusCodeTest.java index 1fefec5..225e8b1 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/StatusCodeTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/logging/enums/StatusCodeTest.java @@ -22,7 +22,7 @@ package org.onap.sdc.security.logging.enums; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.Test; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerSdcAuditTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerSdcAuditTest.java index 67412b4..091cda5 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerSdcAuditTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerSdcAuditTest.java @@ -14,9 +14,9 @@ */ package org.onap.sdc.security.logging.wrappers; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.any; import static org.mockito.Mockito.anyString; import static org.mockito.Mockito.mock; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerSdcUtilBaseTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerSdcUtilBaseTest.java index 7c16999..e764550 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerSdcUtilBaseTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerSdcUtilBaseTest.java @@ -14,10 +14,10 @@ */ package org.onap.sdc.security.logging.wrappers; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.any; import static org.mockito.ArgumentMatchers.anyInt; import static org.mockito.ArgumentMatchers.anyList; diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerTest.java index 0912920..731bf5e 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/logging/wrappers/LoggerTest.java @@ -14,10 +14,10 @@ */ package org.onap.sdc.security.logging.wrappers; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertFalse; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.any; import static org.mockito.Mockito.anyCollection; import static org.mockito.Mockito.anyString; @@ -59,7 +59,7 @@ public class LoggerTest { @Test public void isDebugEnabled() { - assertTrue("Debug level not enabled", log.isDebugEnabled()); + assertTrue(log.isDebugEnabled(),"Debug level not enabled"); } @Test @@ -69,23 +69,23 @@ public class LoggerTest { @Test public void isTraceEnabled() { - assertFalse("Trace level should not enabled", spy.isTraceEnabled()); + assertFalse(spy.isTraceEnabled(),"Trace level should be enabled"); } @Test public void isErrorEnabled() { - assertTrue("Error level is not enabled", spy.isErrorEnabled()); + assertTrue(spy.isErrorEnabled(),"Error level is not enabled"); } @Test public void isWarnEnabled() { - assertTrue("Warn level is not enabled", spy.isWarnEnabled()); + assertTrue(spy.isWarnEnabled(),"Warn level is not enabled"); } @Test public void isInfoEnabled() { - assertTrue("Info level is not enabled", spy.isInfoEnabled()); + assertTrue(spy.isInfoEnabled(), "Info level is not enabled"); } @Test @@ -399,4 +399,4 @@ public class LoggerTest { anyString(), any(ErrorLogOptionalData.class), anyString(), anyCollection(), anyCollection(), anyCollection()); } -}
\ No newline at end of file +} diff --git a/security-util-lib/src/test/java/org/onap/sdc/security/util/SecurityLogsUtilsTest.java b/security-util-lib/src/test/java/org/onap/sdc/security/util/SecurityLogsUtilsTest.java index b05dc64..3763ecf 100644 --- a/security-util-lib/src/test/java/org/onap/sdc/security/util/SecurityLogsUtilsTest.java +++ b/security-util-lib/src/test/java/org/onap/sdc/security/util/SecurityLogsUtilsTest.java @@ -22,13 +22,13 @@ package org.onap.sdc.security.util; -import org.junit.Test; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.onap.sdc.security.utils.SecurityLogsUtils.PORTAL_TARGET_ENTITY; + +import org.junit.jupiter.api.Test; import org.onap.sdc.security.logging.elements.ErrorLogOptionalData; import org.onap.sdc.security.utils.SecurityLogsUtils; -import static org.junit.Assert.assertNotNull; -import static org.onap.sdc.security.utils.SecurityLogsUtils.PORTAL_TARGET_ENTITY; - public class SecurityLogsUtilsTest { @Test diff --git a/session-lib/pom.xml b/session-lib/pom.xml index f603501..3c81005 100644 --- a/session-lib/pom.xml +++ b/session-lib/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.sdc.sdc-be-common</groupId> <artifactId>sdc-be-common-parent</artifactId> - <version>1.6.0-SNAPSHOT</version> + <version>1.6.1-SNAPSHOT</version> </parent> diff --git a/session-lib/src/test/java/org/onap/sdc/common/session/SdcSessionContextProviderTest.java b/session-lib/src/test/java/org/onap/sdc/common/session/SdcSessionContextProviderTest.java index a118973..b4b441f 100644 --- a/session-lib/src/test/java/org/onap/sdc/common/session/SdcSessionContextProviderTest.java +++ b/session-lib/src/test/java/org/onap/sdc/common/session/SdcSessionContextProviderTest.java @@ -16,7 +16,7 @@ package org.onap.sdc.common.session; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.AfterEach; diff --git a/version.properties b/version.properties index da50b39..e231db3 100644 --- a/version.properties +++ b/version.properties @@ -1,5 +1,5 @@ # -# Copyright © 2019 European Support Limited +# Copyright © 2019 European Support Limited # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. @@ -22,7 +22,7 @@ # major=1 minor=6 -patch=0 +patch=1 base_version=${major}.${minor}.${patch} diff --git a/versioning-lib/pom.xml b/versioning-lib/pom.xml index 28569bf..bab2ffd 100644 --- a/versioning-lib/pom.xml +++ b/versioning-lib/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.sdc.sdc-be-common</groupId> <artifactId>sdc-be-common-parent</artifactId> - <version>1.6.0-SNAPSHOT</version> + <version>1.6.1-SNAPSHOT</version> </parent> <dependencies> diff --git a/versioning-lib/src/test/java/org/onap/sdc/common/versioning/persistence/zusammen/ItemZusammenDaoTest.java b/versioning-lib/src/test/java/org/onap/sdc/common/versioning/persistence/zusammen/ItemZusammenDaoTest.java index c827aaa..c75d62d 100644 --- a/versioning-lib/src/test/java/org/onap/sdc/common/versioning/persistence/zusammen/ItemZusammenDaoTest.java +++ b/versioning-lib/src/test/java/org/onap/sdc/common/versioning/persistence/zusammen/ItemZusammenDaoTest.java @@ -17,7 +17,10 @@ package org.onap.sdc.common.versioning.persistence.zusammen; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertNull; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.verify; @@ -40,7 +43,6 @@ import java.util.List; import java.util.Map; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.junit.Assert; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -82,7 +84,7 @@ public class ItemZusammenDaoTest { Collection<InternalItem> items = itemDao.list(); - Assert.assertTrue(items.isEmpty()); + assertTrue(items.isEmpty()); } @Test @@ -113,8 +115,7 @@ public class ItemZusammenDaoTest { @Test public void testGetNonExisting() { InternalItem item = itemDao.get("nonExisting"); - - Assert.assertNull(item); + assertNull(item); } @Test @@ -132,7 +133,7 @@ public class ItemZusammenDaoTest { InternalItem item = itemDao.get(itemId); - Assert.assertNotNull(item); + assertNotNull(item); assertItemEquals(item, toBeReturned); assertEquals(ItemStatus.ACTIVE, item.getStatus()); @@ -223,7 +224,7 @@ public class ItemZusammenDaoTest { } private Item createItem(String id, String name, String description, String type, Date creationTime, - Date modificationTime, Map<String, Number> versionStatusCounters) { + Date modificationTime, Map<String, Number> versionStatusCounters) { Item item = new Item(); item.setId(new Id(id)); Info info = new Info(); diff --git a/versioning-lib/src/test/java/org/onap/sdc/common/versioning/persistence/zusammen/VersionZusammenDaoTest.java b/versioning-lib/src/test/java/org/onap/sdc/common/versioning/persistence/zusammen/VersionZusammenDaoTest.java index 985e3c6..c66a402 100644 --- a/versioning-lib/src/test/java/org/onap/sdc/common/versioning/persistence/zusammen/VersionZusammenDaoTest.java +++ b/versioning-lib/src/test/java/org/onap/sdc/common/versioning/persistence/zusammen/VersionZusammenDaoTest.java @@ -17,6 +17,8 @@ package org.onap.sdc.common.versioning.persistence.zusammen; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.ArgumentMatchers.eq; import static org.mockito.ArgumentMatchers.isNull; import static org.mockito.Mockito.doReturn; @@ -39,7 +41,6 @@ import java.util.Map; import java.util.Optional; import java.util.stream.Collectors; import java.util.stream.Stream; -import org.junit.Assert; import org.junit.jupiter.api.BeforeEach; import org.junit.jupiter.api.Test; import org.mockito.ArgumentCaptor; @@ -78,11 +79,11 @@ public class VersionZusammenDaoTest { String itemId = "itemId"; doReturn(new ArrayList<>()).when(zusammenAdaptorMock) - .listPublicVersions(eq(SESSION_CONTEXT), eq(new Id(itemId))); + .listPublicVersions(eq(SESSION_CONTEXT), eq(new Id(itemId))); List<InternalVersion> versions = versionDao.list(itemId); - Assert.assertTrue(versions.isEmpty()); + assertTrue(versions.isEmpty()); } @Test @@ -93,20 +94,20 @@ public class VersionZusammenDaoTest { Id versionId3 = new Id("v3_id"); List<ItemVersion> zusammenVersions = - Stream.of(createZusammenVersion(versionId1, null, "version desc", "1.0", VersionStatus.Certified), - createZusammenVersion(versionId2, versionId1, "version desc", "2.0", VersionStatus.Certified), - createZusammenVersion(versionId3, versionId2, "version desc", "3.0", VersionStatus.Draft)) - .collect(Collectors.toList()); + Stream.of(createZusammenVersion(versionId1, null, "version desc", "1.0", VersionStatus.Certified), + createZusammenVersion(versionId2, versionId1, "version desc", "2.0", VersionStatus.Certified), + createZusammenVersion(versionId3, versionId2, "version desc", "3.0", VersionStatus.Draft)) + .collect(Collectors.toList()); doReturn(zusammenVersions).when(zusammenAdaptorMock) - .listPublicVersions(eq(SESSION_CONTEXT), eq(new Id(itemId))); + .listPublicVersions(eq(SESSION_CONTEXT), eq(new Id(itemId))); List<InternalVersion> versions = versionDao.list(itemId); - Assert.assertEquals(3, versions.size()); + assertEquals(3, versions.size()); int zusammenVersionIndex; for (InternalVersion version : versions) { zusammenVersionIndex = versionId1.getValue().equals(version.getId()) ? 0 : - versionId2.getValue().equals(version.getId()) ? 1 : 2; + versionId2.getValue().equals(version.getId()) ? 1 : 2; assetVersionEquals(version, zusammenVersions.get(zusammenVersionIndex), null); } } @@ -137,20 +138,19 @@ public class VersionZusammenDaoTest { String versionId = "versionId"; doReturn(new Id(versionId)).when(zusammenAdaptorMock) - .createVersion(eq(SESSION_CONTEXT), eq(new Id(itemId)), baseId == null ? isNull() : eq(new Id(baseId)), - capturedZusammenVersion.capture()); - + .createVersion(eq(SESSION_CONTEXT), eq(new Id(itemId)), baseId == null ? isNull() : eq(new Id(baseId)), + capturedZusammenVersion.capture()); versionDao.create(itemId, version); - Assert.assertEquals(version.getId(), versionId); + assertEquals(version.getId(), versionId); Info capturedInfo = capturedZusammenVersion.getValue().getInfo(); - Assert.assertEquals(capturedInfo.getName(), version.getName()); - Assert.assertEquals(capturedInfo.getDescription(), version.getDescription()); - Assert.assertEquals(VersionStatus.valueOf(capturedInfo.getProperty(STATUS_PROPERTY)), version.getStatus()); + assertEquals(capturedInfo.getName(), version.getName()); + assertEquals(capturedInfo.getDescription(), version.getDescription()); + assertEquals(VersionStatus.valueOf(capturedInfo.getProperty(STATUS_PROPERTY)), version.getStatus()); String capturedInfoProperty = capturedInfo.getProperty("key"); - Assert.assertEquals(capturedInfoProperty, version.getProperty("key")); + assertEquals(capturedInfoProperty, version.getProperty("key")); } @Test @@ -166,17 +166,17 @@ public class VersionZusammenDaoTest { ArgumentCaptor<ItemVersionData> capturedZusammenVersion = ArgumentCaptor.forClass(ItemVersionData.class); doReturn(new Id(versionId)).when(zusammenAdaptorMock) - .createVersion(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(version.getId())), isNull(), - capturedZusammenVersion.capture()); + .createVersion(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(version.getId())), isNull(), + capturedZusammenVersion.capture()); versionDao.create(itemId, version); - Assert.assertEquals(version.getId(), versionId); + assertEquals(version.getId(), versionId); Info capturedInfo = capturedZusammenVersion.getValue().getInfo(); - Assert.assertEquals(capturedInfo.getName(), version.getName()); - Assert.assertEquals(capturedInfo.getDescription(), version.getDescription()); - Assert.assertEquals(VersionStatus.valueOf(capturedInfo.getProperty(STATUS_PROPERTY)), version.getStatus()); + assertEquals(capturedInfo.getName(), version.getName()); + assertEquals(capturedInfo.getDescription(), version.getDescription()); + assertEquals(VersionStatus.valueOf(capturedInfo.getProperty(STATUS_PROPERTY)), version.getStatus()); } @Test @@ -194,19 +194,19 @@ public class VersionZusammenDaoTest { versionDao.update(itemId, version); verify(zusammenAdaptorMock).updateVersion(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(version.getId())), - capturedZusammenVersion.capture()); + capturedZusammenVersion.capture()); Info capturedInfo = capturedZusammenVersion.getValue().getInfo(); - Assert.assertEquals(capturedInfo.getName(), version.getName()); - Assert.assertEquals(capturedInfo.getDescription(), version.getDescription()); - Assert.assertEquals(VersionStatus.valueOf(capturedInfo.getProperty(STATUS_PROPERTY)), version.getStatus()); + assertEquals(capturedInfo.getName(), version.getName()); + assertEquals(capturedInfo.getDescription(), version.getDescription()); + assertEquals(VersionStatus.valueOf(capturedInfo.getProperty(STATUS_PROPERTY)), version.getStatus()); } @Test public void testGetNonExisting() { Optional<InternalVersion> version = versionDao.get("itemId", "versionId"); - Assert.assertEquals(version, Optional.empty()); + assertEquals(version, Optional.empty()); } @Test @@ -219,18 +219,18 @@ public class VersionZusammenDaoTest { Id versionIdObj = new Id(versionId); ItemVersion zusammenPrivateVersion = - createZusammenVersion(versionIdObj, new Id("baseId"), "version desc updated", "2.0", - VersionStatus.Draft); + createZusammenVersion(versionIdObj, new Id("baseId"), "version desc updated", "2.0", + VersionStatus.Draft); doReturn(zusammenPrivateVersion).when(zusammenAdaptorMock) - .getVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); + .getVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); ItemVersionStatus zusammenVersionStatus = new ItemVersionStatus(SynchronizationStatus.UP_TO_DATE, true); doReturn(zusammenVersionStatus).when(zusammenAdaptorMock) - .getVersionStatus(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); + .getVersionStatus(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); Optional<InternalVersion> version = versionDao.get(itemId, versionId); - Assert.assertTrue(version.isPresent()); + assertTrue(version.isPresent()); assetVersionEquals(version.get(), zusammenPrivateVersion, zusammenVersionStatus); } @@ -244,24 +244,24 @@ public class VersionZusammenDaoTest { Id versionIdObj = new Id(versionId); ItemVersion zusammenPrivateVersion = - createZusammenVersion(versionIdObj, new Id("baseId"), "version desc updated", "2.0", - VersionStatus.Draft); + createZusammenVersion(versionIdObj, new Id("baseId"), "version desc updated", "2.0", + VersionStatus.Draft); doReturn(zusammenPrivateVersion).when(zusammenAdaptorMock) - .getVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); + .getVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); ItemVersionStatus zusammenVersionStatus = new ItemVersionStatus(SynchronizationStatus.OUT_OF_SYNC, true); doReturn(zusammenVersionStatus).when(zusammenAdaptorMock) - .getVersionStatus(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); + .getVersionStatus(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); VersionStatus statusOnPublic = VersionStatus.Certified; ItemVersion zusammenPublicVersion = - createZusammenVersion(versionIdObj, new Id("baseId"), "version desc", "2.0", statusOnPublic); + createZusammenVersion(versionIdObj, new Id("baseId"), "version desc", "2.0", statusOnPublic); doReturn(zusammenPublicVersion).when(zusammenAdaptorMock) - .getPublicVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); + .getPublicVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); Optional<InternalVersion> version = versionDao.get(itemId, versionId); - Assert.assertTrue(version.isPresent()); + assertTrue(version.isPresent()); zusammenPrivateVersion.getData().getInfo().addProperty(STATUS_PROPERTY, statusOnPublic.name()); assetVersionEquals(version.get(), zusammenPrivateVersion, zusammenVersionStatus); } @@ -276,22 +276,22 @@ public class VersionZusammenDaoTest { Id versionIdObj = new Id(versionId); ItemVersion zusammenPrivateVersion = - createZusammenVersion(versionIdObj, new Id("baseId"), "version desc", "2.0", VersionStatus.Draft); + createZusammenVersion(versionIdObj, new Id("baseId"), "version desc", "2.0", VersionStatus.Draft); doReturn(zusammenPrivateVersion).when(zusammenAdaptorMock) - .getVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); + .getVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); ItemVersionStatus zusammenVersionStatus = new ItemVersionStatus(SynchronizationStatus.MERGING, true); doReturn(zusammenVersionStatus).when(zusammenAdaptorMock) - .getVersionStatus(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); + .getVersionStatus(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); ItemVersion zusammenPublicVersion = - createZusammenVersion(versionIdObj, new Id("baseId"), "version desc", "2.0", VersionStatus.Draft); + createZusammenVersion(versionIdObj, new Id("baseId"), "version desc", "2.0", VersionStatus.Draft); doReturn(zusammenPublicVersion).when(zusammenAdaptorMock) - .getPublicVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); + .getPublicVersion(eq(zusammenContext), eq(itemIdObj), eq(versionIdObj)); Optional<InternalVersion> version = versionDao.get(itemId, versionId); - Assert.assertTrue(version.isPresent()); + assertTrue(version.isPresent()); assetVersionEquals(version.get(), zusammenPrivateVersion, zusammenVersionStatus); } @@ -304,7 +304,7 @@ public class VersionZusammenDaoTest { versionDao.publish(itemId, versionId, message); verify(zusammenAdaptorMock) - .publishVersion(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(versionId)), eq(message)); + .publishVersion(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(versionId)), eq(message)); } @Test @@ -336,7 +336,7 @@ public class VersionZusammenDaoTest { versionDao.revert(itemId, versionId, revisionId); verify(zusammenAdaptorMock) - .revert(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(versionId)), eq(new Id(revisionId))); + .revert(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(versionId)), eq(new Id(revisionId))); } @Test @@ -346,7 +346,7 @@ public class VersionZusammenDaoTest { List<Revision> revisions = versionDao.listRevisions(itemId, versionId); - Assert.assertTrue(revisions.isEmpty()); + assertTrue(revisions.isEmpty()); } @Test @@ -360,18 +360,18 @@ public class VersionZusammenDaoTest { Date rev2time = new Date(currentTime - 2); Date rev1time = new Date(currentTime - 3); // oldest List<com.amdocs.zusammen.datatypes.itemversion.Revision> zusammenRevisions = - Stream.of(createZusammenRevision("rev4", "forth rev", "user1", rev4time), - createZusammenRevision("rev1", "first rev", "user2", rev1time), - createZusammenRevision("rev3", "third rev", "user2", rev3time), - createZusammenRevision("rev2", "second rev", "user1", rev2time)).collect(Collectors.toList()); + Stream.of(createZusammenRevision("rev4", "forth rev", "user1", rev4time), + createZusammenRevision("rev1", "first rev", "user2", rev1time), + createZusammenRevision("rev3", "third rev", "user2", rev3time), + createZusammenRevision("rev2", "second rev", "user1", rev2time)).collect(Collectors.toList()); ItemVersionRevisions toBeReturned = new ItemVersionRevisions(); toBeReturned.setItemVersionRevisions(zusammenRevisions); doReturn(toBeReturned).when(zusammenAdaptorMock) - .listRevisions(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(versionId))); + .listRevisions(eq(SESSION_CONTEXT), eq(new Id(itemId)), eq(new Id(versionId))); List<Revision> revisions = versionDao.listRevisions(itemId, versionId); - Assert.assertEquals(4, revisions.size()); + assertEquals(4, revisions.size()); assertRevisionEquals(revisions.get(0), zusammenRevisions.get(0)); // rev4 - latest assertRevisionEquals(revisions.get(1), zusammenRevisions.get(2)); // rev3 assertRevisionEquals(revisions.get(2), zusammenRevisions.get(3)); // rev2 @@ -395,28 +395,28 @@ public class VersionZusammenDaoTest { } private void assetVersionEquals(InternalVersion version, ItemVersion zusammenVersion, - ItemVersionStatus zusammenVersionStatus) { - Assert.assertEquals(version.getId(), zusammenVersion.getId().getValue()); - Assert.assertEquals(version.getBaseId(), - zusammenVersion.getBaseId() == null ? null : zusammenVersion.getBaseId().getValue()); + ItemVersionStatus zusammenVersionStatus) { + assertEquals(version.getId(), zusammenVersion.getId().getValue()); + assertEquals(version.getBaseId(), + zusammenVersion.getBaseId() == null ? null : zusammenVersion.getBaseId().getValue()); Info info = zusammenVersion.getData().getInfo(); - Assert.assertEquals(version.getName(), info.getName()); - Assert.assertEquals(version.getDescription(), info.getDescription()); - Assert.assertEquals(version.getStatus(), VersionStatus.valueOf(info.getProperty(STATUS_PROPERTY))); - Assert.assertEquals(version.getCreationTime(), zusammenVersion.getCreationTime()); - Assert.assertEquals(version.getModificationTime(), zusammenVersion.getModificationTime()); + assertEquals(version.getName(), info.getName()); + assertEquals(version.getDescription(), info.getDescription()); + assertEquals(version.getStatus(), VersionStatus.valueOf(info.getProperty(STATUS_PROPERTY))); + assertEquals(version.getCreationTime(), zusammenVersion.getCreationTime()); + assertEquals(version.getModificationTime(), zusammenVersion.getModificationTime()); if (zusammenVersionStatus != null) { - Assert.assertEquals(version.getState().isDirty(), zusammenVersionStatus.isDirty()); - Assert.assertEquals(version.getState().getSynchronizationState().toString(), - zusammenVersionStatus.getSynchronizationStatus().toString()); + assertEquals(version.getState().isDirty(), zusammenVersionStatus.isDirty()); + assertEquals(version.getState().getSynchronizationState().toString(), + zusammenVersionStatus.getSynchronizationStatus().toString()); } } private com.amdocs.zusammen.datatypes.itemversion.Revision createZusammenRevision(String id, String message, - String user, Date time) { + String user, Date time) { com.amdocs.zusammen.datatypes.itemversion.Revision revision = - new com.amdocs.zusammen.datatypes.itemversion.Revision(); + new com.amdocs.zusammen.datatypes.itemversion.Revision(); revision.setRevisionId(new Id(id)); revision.setMessage(message); revision.setUser(user); @@ -425,10 +425,10 @@ public class VersionZusammenDaoTest { } private void assertRevisionEquals(Revision revision, - com.amdocs.zusammen.datatypes.itemversion.Revision zusammenRevision) { - Assert.assertEquals(revision.getId(), zusammenRevision.getRevisionId().getValue()); - Assert.assertEquals(revision.getMessage(), zusammenRevision.getMessage()); - Assert.assertEquals(revision.getUser(), zusammenRevision.getUser()); - Assert.assertEquals(revision.getTime(), zusammenRevision.getTime()); + com.amdocs.zusammen.datatypes.itemversion.Revision zusammenRevision) { + assertEquals(revision.getId(), zusammenRevision.getRevisionId().getValue()); + assertEquals(revision.getMessage(), zusammenRevision.getMessage()); + assertEquals(revision.getUser(), zusammenRevision.getUser()); + assertEquals(revision.getTime(), zusammenRevision.getTime()); } } diff --git a/versioning-lib/src/test/java/org/onap/sdc/common/versioning/services/impl/MajorVersionCalculatorImplTest.java b/versioning-lib/src/test/java/org/onap/sdc/common/versioning/services/impl/MajorVersionCalculatorImplTest.java index b7f69a0..d62c63c 100644 --- a/versioning-lib/src/test/java/org/onap/sdc/common/versioning/services/impl/MajorVersionCalculatorImplTest.java +++ b/versioning-lib/src/test/java/org/onap/sdc/common/versioning/services/impl/MajorVersionCalculatorImplTest.java @@ -16,7 +16,7 @@ package org.onap.sdc.common.versioning.services.impl; -import static org.junit.Assert.assertEquals; +import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertThrows; import org.junit.jupiter.api.BeforeEach; diff --git a/versioning-lib/src/test/java/org/onap/sdc/common/versioning/services/impl/VersioningManagerImplTest.java b/versioning-lib/src/test/java/org/onap/sdc/common/versioning/services/impl/VersioningManagerImplTest.java index 7059684..65e010d 100644 --- a/versioning-lib/src/test/java/org/onap/sdc/common/versioning/services/impl/VersioningManagerImplTest.java +++ b/versioning-lib/src/test/java/org/onap/sdc/common/versioning/services/impl/VersioningManagerImplTest.java @@ -16,10 +16,10 @@ package org.onap.sdc.common.versioning.services.impl; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; -import static org.junit.Assert.assertTrue; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; +import static org.junit.jupiter.api.Assertions.assertTrue; import static org.mockito.Mockito.when; import com.google.common.collect.ImmutableList; diff --git a/zusammen-lib/pom.xml b/zusammen-lib/pom.xml index 20c4afc..81949d8 100644 --- a/zusammen-lib/pom.xml +++ b/zusammen-lib/pom.xml @@ -26,7 +26,7 @@ <parent> <groupId>org.onap.sdc.sdc-be-common</groupId> <artifactId>sdc-be-common-parent</artifactId> - <version>1.6.0-SNAPSHOT</version> + <version>1.6.1-SNAPSHOT</version> </parent> <properties> diff --git a/zusammen-lib/src/test/java/org/onap/sdc/common/zusammen/config/ZusammenConfigTest.java b/zusammen-lib/src/test/java/org/onap/sdc/common/zusammen/config/ZusammenConfigTest.java index ce240a6..00b7a53 100644 --- a/zusammen-lib/src/test/java/org/onap/sdc/common/zusammen/config/ZusammenConfigTest.java +++ b/zusammen-lib/src/test/java/org/onap/sdc/common/zusammen/config/ZusammenConfigTest.java @@ -16,7 +16,7 @@ package org.onap.sdc.common.zusammen.config; -import org.junit.Assert; +import static org.junit.jupiter.api.Assertions.assertEquals; import org.junit.jupiter.api.AfterEach; import org.junit.jupiter.api.Test; import org.mockito.Mockito; @@ -32,7 +32,7 @@ public class ZusammenConfigTest { ZusammenConfig zusammenConfig = new ZusammenConfig(provider); zusammenConfig.init(); Mockito.verify(provider).getCassandraAddresses(); - Assert.assertEquals(a, System.getProperty("cassandra.nodes")); + assertEquals(a, System.getProperty("cassandra.nodes")); } @AfterEach diff --git a/zusammen-lib/src/test/java/org/onap/sdc/common/zusammen/persistence/ZusammenConnectorTest.java b/zusammen-lib/src/test/java/org/onap/sdc/common/zusammen/persistence/ZusammenConnectorTest.java index 3ebcaba..e5eb7ea 100644 --- a/zusammen-lib/src/test/java/org/onap/sdc/common/zusammen/persistence/ZusammenConnectorTest.java +++ b/zusammen-lib/src/test/java/org/onap/sdc/common/zusammen/persistence/ZusammenConnectorTest.java @@ -17,8 +17,8 @@ package org.onap.sdc.common.zusammen.persistence; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNotNull; +import static org.junit.jupiter.api.Assertions.assertEquals; +import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertThrows; import static org.mockito.Mockito.mock; import static org.mockito.Mockito.spy; |