summaryrefslogtreecommitdiffstats
path: root/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java
diff options
context:
space:
mode:
authormmis <michael.morris@ericsson.com>2018-03-16 14:42:22 +0000
committermmis <michael.morris@ericsson.com>2018-03-20 10:48:42 +0000
commit5492c1dd9d7052781ae5cab28bf5bcc829ae9c9e (patch)
treeec204aa0d662c87cdfc780b2c1a84ab40211a63c /common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java
parent7edd9111caddfed6867b7d5dca580c8eba34df44 (diff)
Removed checkstyle warnings
Removed checkstyle warnings in policy/common/logging Some warnings remain that required renaming of classes and public methods. These will be taken separately Issue-ID: POLICY-695 Change-Id: Id604c66708917de390c556b50f6266f929b09134 Signed-off-by: mmis <michael.morris@ericsson.com>
Diffstat (limited to 'common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java')
-rw-r--r--common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java19
1 files changed, 14 insertions, 5 deletions
diff --git a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java
index 3650b18a..852e7f1b 100644
--- a/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java
+++ b/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java
@@ -17,10 +17,17 @@
* limitations under the License.
* ============LICENSE_END=========================================================
*/
+
package org.onap.policy.common.logging.flexlogger;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNotEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
import java.util.UUID;
+
import org.apache.log4j.Logger;
import org.apache.log4j.Priority;
import org.junit.Test;
@@ -29,7 +36,7 @@ import org.onap.policy.common.logging.eelf.MessageCodes;
import org.onap.policy.common.logging.util.TestUtils;
public class Logger4JTest {
-
+
private Logger4J logger4J = new Logger4J("str1", "Logger4JTest");
@Test
@@ -215,7 +222,8 @@ public class Logger4JTest {
TestUtils.overrideField(Logger4J.class, logger4J, "log", logger);
logger4J.setTransId("transactionId");
logger4J.error(MessageCodes.GENERAL_ERROR, new NullPointerException(), "str1", "str2");
- Mockito.verify(logger).error("transactionId|Logger4JTest|MessageCodes :" + MessageCodes.GENERAL_ERROR + "[str1, str2]");
+ Mockito.verify(logger)
+ .error("transactionId|Logger4JTest|MessageCodes :" + MessageCodes.GENERAL_ERROR + "[str1, str2]");
}
@Test
@@ -224,7 +232,8 @@ public class Logger4JTest {
TestUtils.overrideField(Logger4J.class, logger4J, "log", logger);
logger4J.setTransId("transactionId");
logger4J.error(MessageCodes.GENERAL_ERROR, "str1", "str2");
- Mockito.verify(logger).error("transactionId|Logger4JTest|MessageCode:" + MessageCodes.GENERAL_ERROR + "[str1, str2]");
+ Mockito.verify(logger)
+ .error("transactionId|Logger4JTest|MessageCode:" + MessageCodes.GENERAL_ERROR + "[str1, str2]");
}
@Test
@@ -232,7 +241,7 @@ public class Logger4JTest {
String returnedTransactionId = logger4J.postMDCInfoForEvent("transactionId");
assertEquals("transactionId", returnedTransactionId);
}
-
+
@Test
public void testPostMDCInfoForEventEmptyString() {
String returnedTransactionId = logger4J.postMDCInfoForEvent("");