From db65955fc93a81911ef66ab88b380dc1a5926dce Mon Sep 17 00:00:00 2001 From: vasraz Date: Fri, 19 Feb 2021 19:04:13 +0000 Subject: Fix BLOCKER BUGs reported by Sonar Signed-off-by: Vasyl Razinkov Change-Id: I00c466ac3fcbe8fab4629aed3a36bb2d8af3a970 Issue-ID: SDC-3472 --- .../sdc/common/log/elements/LoggerFactoryTest.java | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'common-app-logging') diff --git a/common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java b/common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java index 0de4d9c045..9a8b7ca7bb 100644 --- a/common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java +++ b/common-app-logging/src/test/java/org/openecomp/sdc/common/log/elements/LoggerFactoryTest.java @@ -24,16 +24,19 @@ import static org.junit.jupiter.api.Assertions.assertNotNull; import static org.junit.jupiter.api.Assertions.assertNull; import org.junit.jupiter.api.Test; +import org.junit.jupiter.api.extension.ExtendWith; import org.mockito.Mock; +import org.mockito.junit.jupiter.MockitoExtension; import org.slf4j.Logger; -public class LoggerFactoryTest { +@ExtendWith(MockitoExtension.class) +class LoggerFactoryTest { @Mock private Logger logger; @Test - public void getMdcLoggerInstantiateProperly() { + void getMdcLoggerInstantiateProperly() { assertNotNull(LoggerFactory.getMdcLogger(LoggerAudit.class, logger)); assertNotNull(LoggerFactory.getMdcLogger(LoggerDebug.class, logger)); assertNotNull(LoggerFactory.getMdcLogger(LoggerMetric.class, logger)); @@ -42,7 +45,7 @@ public class LoggerFactoryTest { } @Test - public void getLoggerInstantiateProperly() { + void getLoggerInstantiateProperly() { assertNotNull(LoggerFactory.getLogger(LoggerAudit.class, logger)); assertNotNull(LoggerFactory.getLogger(LoggerDebug.class, logger)); assertNotNull(LoggerFactory.getLogger(LoggerMetric.class, logger)); @@ -50,12 +53,12 @@ public class LoggerFactoryTest { } @Test - public void getMdcLoggerReturnsNullForSomeInvalidClasses() { + void getMdcLoggerReturnsNullForSomeInvalidClasses() { assertNull(LoggerFactory.getMdcLogger(Integer.class, logger)); } @Test - public void getLoggerReturnsNullForSomeInvalidClasses() { + void getLoggerReturnsNullForSomeInvalidClasses() { assertNull(LoggerFactory.getLogger(Integer.class, logger)); } -- cgit 1.2.3-korg