aboutsummaryrefslogtreecommitdiffstats
path: root/common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java
diff options
context:
space:
mode:
authorPamela Dragosh <pdragosh@research.att.com>2018-03-20 14:49:45 +0000
committerGerrit Code Review <gerrit@onap.org>2018-03-20 14:49:45 +0000
commitff1b759ff023dc9a940ab9de4333adcac82b9867 (patch)
tree039e5ae2835874dbcbdf7ba7981b853242c51655 /common-logging/src/test/java/org/onap/policy/common/logging/flexlogger/Logger4JTest.java
parent77ad3209e44b4d749cf45d2c5b2bd9e0214e9c9c (diff)
parent5492c1dd9d7052781ae5cab28bf5bcc829ae9c9e (diff)
Merge "Removed checkstyle warnings"
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("");