You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@logging.apache.org by gg...@apache.org on 2018/03/01 19:47:36 UTC

logging-log4j2 git commit: Now that we are on Java 8, we do not need to keep the test set up that allowed for MongoDB tests to be disabled if not running on Java 8. This was due to the dependency on Java 8 of the MongoDB test framework we use.

Repository: logging-log4j2
Updated Branches:
  refs/heads/master 33af8889c -> 574945015


Now that we are on Java 8, we do not need to keep the test set up that
allowed for MongoDB tests to be disabled if not running on Java 8. This
was due to the dependency on Java 8 of the MongoDB test framework we
use.

Project: http://git-wip-us.apache.org/repos/asf/logging-log4j2/repo
Commit: http://git-wip-us.apache.org/repos/asf/logging-log4j2/commit/57494501
Tree: http://git-wip-us.apache.org/repos/asf/logging-log4j2/tree/57494501
Diff: http://git-wip-us.apache.org/repos/asf/logging-log4j2/diff/57494501

Branch: refs/heads/master
Commit: 5749450151cc0f3fc4179540e658a2b9faf0b467
Parents: 33af888
Author: Gary Gregory <ga...@gmail.com>
Authored: Thu Mar 1 12:47:30 2018 -0700
Committer: Gary Gregory <ga...@gmail.com>
Committed: Thu Mar 1 12:47:30 2018 -0700

----------------------------------------------------------------------
 .../logging/log4j/mongodb2/Java8Test.java       | 48 ------------
 .../log4j/mongodb2/MongoDbAuthFailureTest.java  | 72 ++++++++++++++++++
 .../mongodb2/MongoDbAuthFailureTestJava8.java   | 72 ------------------
 .../log4j/mongodb2/MongoDbCappedTest.java       | 72 ++++++++++++++++++
 .../log4j/mongodb2/MongoDbCappedTestJava8.java  | 72 ------------------
 .../log4j/mongodb2/MongoDbMapMessageTest.java   | 78 ++++++++++++++++++++
 .../mongodb2/MongoDbMapMessageTestJava8.java    | 78 --------------------
 .../logging/log4j/mongodb2/MongoDbTest.java     | 71 ++++++++++++++++++
 .../log4j/mongodb2/MongoDbTestJava8.java        | 71 ------------------
 .../log4j/mongodb2/MongoDbTestTestRuleTest.java | 71 ++++++++++++++++++
 .../mongodb2/MongoDbTestTestRuleTestJava8.java  | 71 ------------------
 .../logging/log4j/mongodb3/Java8Test.java       | 48 ------------
 .../log4j/mongodb3/MongoDbAuthFailureTest.java  | 72 ++++++++++++++++++
 .../mongodb3/MongoDbAuthFailureTestJava8.java   | 72 ------------------
 .../log4j/mongodb3/MongoDbCappedTest.java       | 69 +++++++++++++++++
 .../log4j/mongodb3/MongoDbCappedTestJava8.java  | 69 -----------------
 .../log4j/mongodb3/MongoDbMapMessageTest.java   | 76 +++++++++++++++++++
 .../mongodb3/MongoDbMapMessageTestJava8.java    | 76 -------------------
 .../logging/log4j/mongodb3/MongoDbTest.java     | 69 +++++++++++++++++
 .../log4j/mongodb3/MongoDbTestJava8.java        | 69 -----------------
 .../log4j/mongodb3/MongoDbTestTestRuleTest.java | 71 ++++++++++++++++++
 .../mongodb3/MongoDbTestTestRuleTestJava8.java  | 71 ------------------
 22 files changed, 721 insertions(+), 817 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/Java8Test.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/Java8Test.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/Java8Test.java
deleted file mode 100644
index 569cf4a..0000000
--- a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/Java8Test.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-
-package org.apache.logging.log4j.mongodb2;
-
-import org.apache.commons.lang3.JavaVersion;
-import org.apache.commons.lang3.SystemUtils;
-import org.junit.Assume;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runs all MongoDB only on Java 8.
- * <p>
- * The test framework {@code de.flapdoodle.embed.mongo} requires Java 8.
- * </p>
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ MongoDbTestTestRuleTestJava8.class, MongoDbAuthFailureTestJava8.class, MongoDbCappedTestJava8.class,
-        MongoDbMapMessageTestJava8.class, MongoDbTestJava8.class })
-public class Java8Test {
-
-    @BeforeClass
-    public static void beforeClass() {
-        Assume.assumeTrue(SystemUtils.JAVA_VERSION, SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8));
-    }
-
-    @Test
-    public void test() {
-        // noop
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbAuthFailureTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbAuthFailureTest.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbAuthFailureTest.java
new file mode 100644
index 0000000..0fb61c6
--- /dev/null
+++ b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbAuthFailureTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.mongodb2;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.categories.Appenders;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.DB;
+import com.mongodb.DBCollection;
+import com.mongodb.MongoClient;
+
+/**
+ * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ *
+ * TODO Set up the log4j user in MongoDB.
+ */
+@Ignore("TODO Set up the log4j user in MongoDB")
+@Category(Appenders.MongoDb.class)
+public class MongoDbAuthFailureTest {
+
+    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-auth-failure.xml");
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
+            loggerContextTestRule);
+
+    @Test
+    public void test() {
+        final Logger logger = LogManager.getLogger();
+        logger.info("Hello log");
+        final MongoClient mongoClient = mongoDbTestRule.getMongoClient();
+        try {
+            final DB database = mongoClient.getDB("test");
+            Assert.assertNotNull(database);
+            final DBCollection collection = database.getCollection("applog");
+            Assert.assertNotNull(collection);
+            Assert.assertFalse(collection.find().hasNext());
+        } finally {
+            mongoClient.close();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbAuthFailureTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbAuthFailureTestJava8.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbAuthFailureTestJava8.java
deleted file mode 100644
index 0d970f7..0000000
--- a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbAuthFailureTestJava8.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.mongodb2;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.junit.LoggerContextRule;
-import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.DB;
-import com.mongodb.DBCollection;
-import com.mongodb.MongoClient;
-
-/**
- * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- *
- * TODO Set up the log4j user in MongoDB.
- */
-@Ignore("TODO Set up the log4j user in MongoDB")
-@Category(Appenders.MongoDb.class)
-public class MongoDbAuthFailureTestJava8 {
-
-    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-auth-failure.xml");
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
-            loggerContextTestRule);
-
-    @Test
-    public void test() {
-        final Logger logger = LogManager.getLogger();
-        logger.info("Hello log");
-        final MongoClient mongoClient = mongoDbTestRule.getMongoClient();
-        try {
-            final DB database = mongoClient.getDB("test");
-            Assert.assertNotNull(database);
-            final DBCollection collection = database.getCollection("applog");
-            Assert.assertNotNull(collection);
-            Assert.assertFalse(collection.find().hasNext());
-        } finally {
-            mongoClient.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbCappedTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbCappedTest.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbCappedTest.java
new file mode 100644
index 0000000..ffd368a
--- /dev/null
+++ b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbCappedTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.mongodb2;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.categories.Appenders;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.DB;
+import com.mongodb.DBCollection;
+import com.mongodb.DBObject;
+import com.mongodb.MongoClient;
+
+/**
+ * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ */
+@Category(Appenders.MongoDb.class)
+public class MongoDbCappedTest {
+
+    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-capped.xml");
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
+            loggerContextTestRule);
+
+    @Test
+    public void test() {
+        final Logger logger = LogManager.getLogger();
+        logger.info("Hello log");
+        final MongoClient mongoClient = mongoDbTestRule.getMongoClient();
+        try {
+            final DB database = mongoClient.getDB("test");
+            Assert.assertNotNull(database);
+            final DBCollection collection = database.getCollection("applog");
+            Assert.assertNotNull(collection);
+            Assert.assertTrue(collection.find().hasNext());
+            final DBObject first = collection.find().next();
+            Assert.assertNotNull(first);
+            Assert.assertEquals(first.toMap().toString(), "Hello log", first.get("message"));
+        } finally {
+            mongoClient.close();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbCappedTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbCappedTestJava8.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbCappedTestJava8.java
deleted file mode 100644
index 03e463a..0000000
--- a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbCappedTestJava8.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.mongodb2;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.junit.LoggerContextRule;
-import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.DB;
-import com.mongodb.DBCollection;
-import com.mongodb.DBObject;
-import com.mongodb.MongoClient;
-
-/**
- * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- */
-@Category(Appenders.MongoDb.class)
-public class MongoDbCappedTestJava8 {
-
-    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-capped.xml");
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
-            loggerContextTestRule);
-
-    @Test
-    public void test() {
-        final Logger logger = LogManager.getLogger();
-        logger.info("Hello log");
-        final MongoClient mongoClient = mongoDbTestRule.getMongoClient();
-        try {
-            final DB database = mongoClient.getDB("test");
-            Assert.assertNotNull(database);
-            final DBCollection collection = database.getCollection("applog");
-            Assert.assertNotNull(collection);
-            Assert.assertTrue(collection.find().hasNext());
-            final DBObject first = collection.find().next();
-            Assert.assertNotNull(first);
-            Assert.assertEquals(first.toMap().toString(), "Hello log", first.get("message"));
-        } finally {
-            mongoClient.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbMapMessageTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbMapMessageTest.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbMapMessageTest.java
new file mode 100644
index 0000000..99350aa
--- /dev/null
+++ b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbMapMessageTest.java
@@ -0,0 +1,78 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.mongodb2;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.categories.Appenders;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.apache.logging.log4j.message.MapMessage;
+import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.DB;
+import com.mongodb.DBCollection;
+import com.mongodb.DBObject;
+import com.mongodb.MongoClient;
+
+/**
+ * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ */
+@Category(Appenders.MongoDb.class)
+public class MongoDbMapMessageTest {
+
+    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-map-message.xml");
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
+            loggerContextTestRule);
+
+    @Test
+    public void test() {
+        final Logger logger = LogManager.getLogger();
+        final MapMessage mapMessage = new MapMessage();
+        mapMessage.with("SomeName", "SomeValue");
+        mapMessage.with("SomeInt", 1);
+        logger.info(mapMessage);
+        //
+        final MongoClient mongoClient = mongoDbTestRule.getMongoClient();
+        try {
+            final DB database = mongoClient.getDB("test");
+            Assert.assertNotNull(database);
+            final DBCollection collection = database.getCollection("applog");
+            Assert.assertNotNull(collection);
+            final DBObject first = collection.find().next();
+            Assert.assertNotNull(first);
+            final String firstMapString = first.toMap().toString();
+            Assert.assertEquals(firstMapString, "SomeValue", first.get("SomeName"));
+            Assert.assertEquals(firstMapString, Integer.valueOf(1), first.get("SomeInt"));
+        } finally {
+            mongoClient.close();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbMapMessageTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbMapMessageTestJava8.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbMapMessageTestJava8.java
deleted file mode 100644
index f18e7ba..0000000
--- a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbMapMessageTestJava8.java
+++ /dev/null
@@ -1,78 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.mongodb2;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.junit.LoggerContextRule;
-import org.apache.logging.log4j.message.MapMessage;
-import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.DB;
-import com.mongodb.DBCollection;
-import com.mongodb.DBObject;
-import com.mongodb.MongoClient;
-
-/**
- * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- */
-@Category(Appenders.MongoDb.class)
-public class MongoDbMapMessageTestJava8 {
-
-    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-map-message.xml");
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
-            loggerContextTestRule);
-
-    @Test
-    public void test() {
-        final Logger logger = LogManager.getLogger();
-        final MapMessage mapMessage = new MapMessage();
-        mapMessage.with("SomeName", "SomeValue");
-        mapMessage.with("SomeInt", 1);
-        logger.info(mapMessage);
-        //
-        final MongoClient mongoClient = mongoDbTestRule.getMongoClient();
-        try {
-            final DB database = mongoClient.getDB("test");
-            Assert.assertNotNull(database);
-            final DBCollection collection = database.getCollection("applog");
-            Assert.assertNotNull(collection);
-            final DBObject first = collection.find().next();
-            Assert.assertNotNull(first);
-            final String firstMapString = first.toMap().toString();
-            Assert.assertEquals(firstMapString, "SomeValue", first.get("SomeName"));
-            Assert.assertEquals(firstMapString, Integer.valueOf(1), first.get("SomeInt"));
-        } finally {
-            mongoClient.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTest.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTest.java
new file mode 100644
index 0000000..2a73f8c
--- /dev/null
+++ b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTest.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.mongodb2;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.categories.Appenders;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.DB;
+import com.mongodb.DBCollection;
+import com.mongodb.DBObject;
+import com.mongodb.MongoClient;
+
+/**
+ * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ */
+@Category(Appenders.MongoDb.class)
+public class MongoDbTest {
+
+    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb.xml");
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
+            loggerContextTestRule);
+
+    @Test
+    public void test() {
+        final Logger logger = LogManager.getLogger();
+        logger.info("Hello log");
+        final MongoClient mongoClient = mongoDbTestRule.getMongoClient();
+        try {
+            final DB database = mongoClient.getDB("test");
+            Assert.assertNotNull(database);
+            final DBCollection collection = database.getCollection("applog");
+            Assert.assertNotNull(collection);
+            final DBObject first = collection.find().next();
+            Assert.assertNotNull(first);
+            Assert.assertEquals(first.toMap().toString(), "Hello log", first.get("message"));
+        } finally {
+            mongoClient.close();
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestJava8.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestJava8.java
deleted file mode 100644
index 0e26610..0000000
--- a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestJava8.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.mongodb2;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.junit.LoggerContextRule;
-import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.DB;
-import com.mongodb.DBCollection;
-import com.mongodb.DBObject;
-import com.mongodb.MongoClient;
-
-/**
- * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- */
-@Category(Appenders.MongoDb.class)
-public class MongoDbTestJava8 {
-
-    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb.xml");
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
-            loggerContextTestRule);
-
-    @Test
-    public void test() {
-        final Logger logger = LogManager.getLogger();
-        logger.info("Hello log");
-        final MongoClient mongoClient = mongoDbTestRule.getMongoClient();
-        try {
-            final DB database = mongoClient.getDB("test");
-            Assert.assertNotNull(database);
-            final DBCollection collection = database.getCollection("applog");
-            Assert.assertNotNull(collection);
-            final DBObject first = collection.find().next();
-            Assert.assertNotNull(first);
-            Assert.assertEquals(first.toMap().toString(), "Hello log", first.get("message"));
-        } finally {
-            mongoClient.close();
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestTestRuleTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestTestRuleTest.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestTestRuleTest.java
new file mode 100644
index 0000000..68e9782
--- /dev/null
+++ b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestTestRuleTest.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+
+package org.apache.logging.log4j.mongodb2;
+
+import java.util.List;
+
+import org.apache.commons.lang3.JavaVersion;
+import org.apache.commons.lang3.SystemUtils;
+import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.rules.RuleChain;
+
+/**
+ * Tests {@link MongoDbTestRule}. This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ * <p>
+ * The test framework {@code de.flapdoodle.embed.mongo} requires Java 8.
+ * </p>
+ */
+public class MongoDbTestTestRuleTest {
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain mongoDbChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule);
+
+    @BeforeClass
+    public static void beforeClass() {
+        Assume.assumeTrue(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8));
+    }
+
+    @Test
+    public void testAccess() {
+        final List<String> databaseNames = mongoDbTestRule.getMongoClient().getDatabaseNames();
+        Assert.assertNotNull(databaseNames);
+        Assert.assertFalse(databaseNames.isEmpty());
+        Assert.assertNotNull(databaseNames.get(0));
+    }
+
+    @Test
+    public void testMongoDbTestRule() {
+        Assert.assertNotNull(mongoDbTestRule);
+        Assert.assertNotNull(mongoDbTestRule.getStarter());
+        Assert.assertNotNull(mongoDbTestRule.getMongoClient());
+        Assert.assertNotNull(mongoDbTestRule.getMongodExecutable());
+        Assert.assertNotNull(mongoDbTestRule.getMongodProcess());
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestTestRuleTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestTestRuleTestJava8.java b/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestTestRuleTestJava8.java
deleted file mode 100644
index 3d8b355..0000000
--- a/log4j-mongodb2/src/test/java/org/apache/logging/log4j/mongodb2/MongoDbTestTestRuleTestJava8.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-
-package org.apache.logging.log4j.mongodb2;
-
-import java.util.List;
-
-import org.apache.commons.lang3.JavaVersion;
-import org.apache.commons.lang3.SystemUtils;
-import org.apache.logging.log4j.mongodb2.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.junit.Assert;
-import org.junit.Assume;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.rules.RuleChain;
-
-/**
- * Tests {@link MongoDbTestRule}. This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- * <p>
- * The test framework {@code de.flapdoodle.embed.mongo} requires Java 8.
- * </p>
- */
-public class MongoDbTestTestRuleTestJava8 {
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(), LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain mongoDbChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule);
-
-    @BeforeClass
-    public static void beforeClass() {
-        Assume.assumeTrue(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8));
-    }
-
-    @Test
-    public void testAccess() {
-        final List<String> databaseNames = mongoDbTestRule.getMongoClient().getDatabaseNames();
-        Assert.assertNotNull(databaseNames);
-        Assert.assertFalse(databaseNames.isEmpty());
-        Assert.assertNotNull(databaseNames.get(0));
-    }
-
-    @Test
-    public void testMongoDbTestRule() {
-        Assert.assertNotNull(mongoDbTestRule);
-        Assert.assertNotNull(mongoDbTestRule.getStarter());
-        Assert.assertNotNull(mongoDbTestRule.getMongoClient());
-        Assert.assertNotNull(mongoDbTestRule.getMongodExecutable());
-        Assert.assertNotNull(mongoDbTestRule.getMongodProcess());
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/Java8Test.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/Java8Test.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/Java8Test.java
deleted file mode 100644
index 71acc29..0000000
--- a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/Java8Test.java
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-
-package org.apache.logging.log4j.mongodb3;
-
-import org.apache.commons.lang3.JavaVersion;
-import org.apache.commons.lang3.SystemUtils;
-import org.junit.Assume;
-import org.junit.BeforeClass;
-import org.junit.Test;
-import org.junit.runner.RunWith;
-import org.junit.runners.Suite;
-
-/**
- * Runs all MongoDB only on Java 8.
- * <p>
- * The test framework {@code de.flapdoodle.embed.mongo} requires Java 8.
- * </p>
- */
-@RunWith(Suite.class)
-@Suite.SuiteClasses({ MongoDbTestTestRuleTestJava8.class, MongoDbAuthFailureTestJava8.class, MongoDbCappedTestJava8.class,
-        MongoDbMapMessageTestJava8.class, MongoDbTestJava8.class })
-public class Java8Test {
-
-    @BeforeClass
-    public static void beforeClass() {
-        Assume.assumeTrue(SystemUtils.JAVA_VERSION, SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8));
-    }
-
-    @Test
-    public void test() {
-        // noop
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbAuthFailureTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbAuthFailureTest.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbAuthFailureTest.java
new file mode 100644
index 0000000..19a45c8
--- /dev/null
+++ b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbAuthFailureTest.java
@@ -0,0 +1,72 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.mongodb3;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.categories.Appenders;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.bson.Document;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Ignore;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.MongoClient;
+import com.mongodb.client.MongoCollection;
+import com.mongodb.client.MongoDatabase;
+
+/**
+ * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ *
+ * TODO Set up the log4j user in MongoDB.
+ */
+@Ignore("TODO Set up the log4j user in MongoDB")
+@Category(Appenders.MongoDb.class)
+public class MongoDbAuthFailureTest {
+
+    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-auth-failure.xml");
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
+            MongoDbAuthFailureTest.class, LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
+            loggerContextTestRule);
+
+    @Test
+    public void test() {
+        final Logger logger = LogManager.getLogger();
+        logger.info("Hello log");
+        try (final MongoClient mongoClient = mongoDbTestRule.getMongoClient()) {
+            final MongoDatabase database = mongoClient.getDatabase("test");
+            Assert.assertNotNull(database);
+            final MongoCollection<Document> collection = database.getCollection("applog");
+            Assert.assertNotNull(collection);
+            final Document first = collection.find().first();
+            Assert.assertNull(first);
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbAuthFailureTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbAuthFailureTestJava8.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbAuthFailureTestJava8.java
deleted file mode 100644
index 6361a44..0000000
--- a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbAuthFailureTestJava8.java
+++ /dev/null
@@ -1,72 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.mongodb3;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.junit.LoggerContextRule;
-import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.bson.Document;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Ignore;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.MongoClient;
-import com.mongodb.client.MongoCollection;
-import com.mongodb.client.MongoDatabase;
-
-/**
- * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- *
- * TODO Set up the log4j user in MongoDB.
- */
-@Ignore("TODO Set up the log4j user in MongoDB")
-@Category(Appenders.MongoDb.class)
-public class MongoDbAuthFailureTestJava8 {
-
-    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-auth-failure.xml");
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
-            MongoDbAuthFailureTestJava8.class, LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
-            loggerContextTestRule);
-
-    @Test
-    public void test() {
-        final Logger logger = LogManager.getLogger();
-        logger.info("Hello log");
-        try (final MongoClient mongoClient = mongoDbTestRule.getMongoClient()) {
-            final MongoDatabase database = mongoClient.getDatabase("test");
-            Assert.assertNotNull(database);
-            final MongoCollection<Document> collection = database.getCollection("applog");
-            Assert.assertNotNull(collection);
-            final Document first = collection.find().first();
-            Assert.assertNull(first);
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbCappedTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbCappedTest.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbCappedTest.java
new file mode 100644
index 0000000..7611284
--- /dev/null
+++ b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbCappedTest.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.mongodb3;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.categories.Appenders;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.bson.Document;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.MongoClient;
+import com.mongodb.client.MongoCollection;
+import com.mongodb.client.MongoDatabase;
+
+/**
+ * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ */
+@Category(Appenders.MongoDb.class)
+public class MongoDbCappedTest {
+
+    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-capped.xml");
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
+            MongoDbCappedTest.class, LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
+            loggerContextTestRule);
+
+    @Test
+    public void test() {
+        final Logger logger = LogManager.getLogger();
+        logger.info("Hello log");
+        try (final MongoClient mongoClient = mongoDbTestRule.getMongoClient()) {
+            final MongoDatabase database = mongoClient.getDatabase("test");
+            Assert.assertNotNull(database);
+            final MongoCollection<Document> collection = database.getCollection("applog");
+            Assert.assertNotNull(collection);
+            final Document first = collection.find().first();
+            Assert.assertNotNull(first);
+            Assert.assertEquals(first.toJson(), "Hello log", first.getString("message"));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbCappedTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbCappedTestJava8.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbCappedTestJava8.java
deleted file mode 100644
index 06fb4f5..0000000
--- a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbCappedTestJava8.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.mongodb3;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.junit.LoggerContextRule;
-import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.bson.Document;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.MongoClient;
-import com.mongodb.client.MongoCollection;
-import com.mongodb.client.MongoDatabase;
-
-/**
- * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- */
-@Category(Appenders.MongoDb.class)
-public class MongoDbCappedTestJava8 {
-
-    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-capped.xml");
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
-            MongoDbCappedTestJava8.class, LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
-            loggerContextTestRule);
-
-    @Test
-    public void test() {
-        final Logger logger = LogManager.getLogger();
-        logger.info("Hello log");
-        try (final MongoClient mongoClient = mongoDbTestRule.getMongoClient()) {
-            final MongoDatabase database = mongoClient.getDatabase("test");
-            Assert.assertNotNull(database);
-            final MongoCollection<Document> collection = database.getCollection("applog");
-            Assert.assertNotNull(collection);
-            final Document first = collection.find().first();
-            Assert.assertNotNull(first);
-            Assert.assertEquals(first.toJson(), "Hello log", first.getString("message"));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbMapMessageTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbMapMessageTest.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbMapMessageTest.java
new file mode 100644
index 0000000..70f910e
--- /dev/null
+++ b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbMapMessageTest.java
@@ -0,0 +1,76 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.mongodb3;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.categories.Appenders;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.apache.logging.log4j.message.MapMessage;
+import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.bson.Document;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.MongoClient;
+import com.mongodb.client.MongoCollection;
+import com.mongodb.client.MongoDatabase;
+
+/**
+ * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ */
+@Category(Appenders.MongoDb.class)
+public class MongoDbMapMessageTest {
+
+    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-map-message.xml");
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
+            MongoDbMapMessageTest.class, LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
+            loggerContextTestRule);
+
+    @Test
+    public void test() {
+        final Logger logger = LogManager.getLogger();
+        final MapMessage mapMessage = new MapMessage();
+        mapMessage.with("SomeName", "SomeValue");
+        mapMessage.with("SomeInt", 1);
+        logger.info(mapMessage);
+        //
+        try (final MongoClient mongoClient = mongoDbTestRule.getMongoClient()) {
+            final MongoDatabase database = mongoClient.getDatabase("test");
+            Assert.assertNotNull(database);
+            final MongoCollection<Document> collection = database.getCollection("applog");
+            Assert.assertNotNull(collection);
+            final Document first = collection.find().first();
+            Assert.assertNotNull(first);
+            final String firstJson = first.toJson();
+            Assert.assertEquals(firstJson, "SomeValue", first.getString("SomeName"));
+            Assert.assertEquals(firstJson, Integer.valueOf(1), first.getInteger("SomeInt"));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbMapMessageTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbMapMessageTestJava8.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbMapMessageTestJava8.java
deleted file mode 100644
index 1c36e08..0000000
--- a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbMapMessageTestJava8.java
+++ /dev/null
@@ -1,76 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.mongodb3;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.junit.LoggerContextRule;
-import org.apache.logging.log4j.message.MapMessage;
-import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.bson.Document;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.MongoClient;
-import com.mongodb.client.MongoCollection;
-import com.mongodb.client.MongoDatabase;
-
-/**
- * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- */
-@Category(Appenders.MongoDb.class)
-public class MongoDbMapMessageTestJava8 {
-
-    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb-map-message.xml");
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
-            MongoDbMapMessageTestJava8.class, LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
-            loggerContextTestRule);
-
-    @Test
-    public void test() {
-        final Logger logger = LogManager.getLogger();
-        final MapMessage mapMessage = new MapMessage();
-        mapMessage.with("SomeName", "SomeValue");
-        mapMessage.with("SomeInt", 1);
-        logger.info(mapMessage);
-        //
-        try (final MongoClient mongoClient = mongoDbTestRule.getMongoClient()) {
-            final MongoDatabase database = mongoClient.getDatabase("test");
-            Assert.assertNotNull(database);
-            final MongoCollection<Document> collection = database.getCollection("applog");
-            Assert.assertNotNull(collection);
-            final Document first = collection.find().first();
-            Assert.assertNotNull(first);
-            final String firstJson = first.toJson();
-            Assert.assertEquals(firstJson, "SomeValue", first.getString("SomeName"));
-            Assert.assertEquals(firstJson, Integer.valueOf(1), first.getInteger("SomeInt"));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTest.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTest.java
new file mode 100644
index 0000000..eab64b3
--- /dev/null
+++ b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTest.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+package org.apache.logging.log4j.mongodb3;
+
+import org.apache.logging.log4j.LogManager;
+import org.apache.logging.log4j.Logger;
+import org.apache.logging.log4j.categories.Appenders;
+import org.apache.logging.log4j.junit.LoggerContextRule;
+import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.bson.Document;
+import org.junit.Assert;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.experimental.categories.Category;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.MongoClient;
+import com.mongodb.client.MongoCollection;
+import com.mongodb.client.MongoDatabase;
+
+/**
+ * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ */
+@Category(Appenders.MongoDb.class)
+public class MongoDbTest {
+
+    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb.xml");
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
+            MongoDbTest.class, LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
+            loggerContextTestRule);
+
+    @Test
+    public void test() {
+        final Logger logger = LogManager.getLogger();
+        logger.info("Hello log");
+        try (final MongoClient mongoClient = mongoDbTestRule.getMongoClient()) {
+            final MongoDatabase database = mongoClient.getDatabase("test");
+            Assert.assertNotNull(database);
+            final MongoCollection<Document> collection = database.getCollection("applog");
+            Assert.assertNotNull(collection);
+            final Document first = collection.find().first();
+            Assert.assertNotNull(first);
+            Assert.assertEquals(first.toJson(), "Hello log", first.getString("message"));
+        }
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestJava8.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestJava8.java
deleted file mode 100644
index e1f283c..0000000
--- a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestJava8.java
+++ /dev/null
@@ -1,69 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-package org.apache.logging.log4j.mongodb3;
-
-import org.apache.logging.log4j.LogManager;
-import org.apache.logging.log4j.Logger;
-import org.apache.logging.log4j.categories.Appenders;
-import org.apache.logging.log4j.junit.LoggerContextRule;
-import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.bson.Document;
-import org.junit.Assert;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.experimental.categories.Category;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.MongoClient;
-import com.mongodb.client.MongoCollection;
-import com.mongodb.client.MongoDatabase;
-
-/**
- * This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- */
-@Category(Appenders.MongoDb.class)
-public class MongoDbTestJava8 {
-
-    private static LoggerContextRule loggerContextTestRule = new LoggerContextRule("log4j2-mongodb.xml");
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
-            MongoDbTestJava8.class, LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain ruleChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule,
-            loggerContextTestRule);
-
-    @Test
-    public void test() {
-        final Logger logger = LogManager.getLogger();
-        logger.info("Hello log");
-        try (final MongoClient mongoClient = mongoDbTestRule.getMongoClient()) {
-            final MongoDatabase database = mongoClient.getDatabase("test");
-            Assert.assertNotNull(database);
-            final MongoCollection<Document> collection = database.getCollection("applog");
-            Assert.assertNotNull(collection);
-            final Document first = collection.find().first();
-            Assert.assertNotNull(first);
-            Assert.assertEquals(first.toJson(), "Hello log", first.getString("message"));
-        }
-    }
-}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestTestRuleTest.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestTestRuleTest.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestTestRuleTest.java
new file mode 100644
index 0000000..e19980b
--- /dev/null
+++ b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestTestRuleTest.java
@@ -0,0 +1,71 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache license, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the license for the specific language governing permissions and
+ * limitations under the license.
+ */
+
+package org.apache.logging.log4j.mongodb3;
+
+import org.apache.commons.lang3.JavaVersion;
+import org.apache.commons.lang3.SystemUtils;
+import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
+import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
+import org.apache.logging.log4j.test.RuleChainFactory;
+import org.junit.Assert;
+import org.junit.Assume;
+import org.junit.BeforeClass;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.junit.rules.RuleChain;
+
+import com.mongodb.client.MongoIterable;
+
+/**
+ * Tests MongoDbRule. This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
+ * <p>
+ * The test framework {@code de.flapdoodle.embed.mongo} requires Java 8.
+ * </p>
+ */
+public class MongoDbTestTestRuleTest {
+
+    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
+            .create(TestConstants.SYS_PROP_NAME_PORT);
+
+    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
+            MongoDbTestTestRuleTest.class, LoggingTarget.NULL);
+
+    @ClassRule
+    public static RuleChain mongoDbChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule);
+
+    @BeforeClass
+    public static void beforeClass() {
+        Assume.assumeTrue(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8));
+    }
+
+    @Test
+    public void testAccess() {
+        final MongoIterable<String> databaseNames = mongoDbTestRule.getMongoClient().listDatabaseNames();
+        Assert.assertNotNull(databaseNames);
+        Assert.assertNotNull(databaseNames.first());
+    }
+
+    @Test
+    public void testMongoDbTestRule() {
+        Assert.assertNotNull(mongoDbTestRule);
+        Assert.assertNotNull(mongoDbTestRule.getStarter());
+        Assert.assertNotNull(mongoDbTestRule.getMongoClient());
+        Assert.assertNotNull(mongoDbTestRule.getMongodExecutable());
+        Assert.assertNotNull(mongoDbTestRule.getMongodProcess());
+    }
+}

http://git-wip-us.apache.org/repos/asf/logging-log4j2/blob/57494501/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestTestRuleTestJava8.java
----------------------------------------------------------------------
diff --git a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestTestRuleTestJava8.java b/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestTestRuleTestJava8.java
deleted file mode 100644
index 21d62f9..0000000
--- a/log4j-mongodb3/src/test/java/org/apache/logging/log4j/mongodb3/MongoDbTestTestRuleTestJava8.java
+++ /dev/null
@@ -1,71 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements. See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache license, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License. You may obtain a copy of the License at
- *
- *      http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the license for the specific language governing permissions and
- * limitations under the license.
- */
-
-package org.apache.logging.log4j.mongodb3;
-
-import org.apache.commons.lang3.JavaVersion;
-import org.apache.commons.lang3.SystemUtils;
-import org.apache.logging.log4j.mongodb3.MongoDbTestRule.LoggingTarget;
-import org.apache.logging.log4j.test.AvailablePortSystemPropertyTestRule;
-import org.apache.logging.log4j.test.RuleChainFactory;
-import org.junit.Assert;
-import org.junit.Assume;
-import org.junit.BeforeClass;
-import org.junit.ClassRule;
-import org.junit.Test;
-import org.junit.rules.RuleChain;
-
-import com.mongodb.client.MongoIterable;
-
-/**
- * Tests MongoDbRule. This class name does NOT end in "Test" in order to only be picked up by {@link Java8Test}.
- * <p>
- * The test framework {@code de.flapdoodle.embed.mongo} requires Java 8.
- * </p>
- */
-public class MongoDbTestTestRuleTestJava8 {
-
-    private static final AvailablePortSystemPropertyTestRule mongoDbPortTestRule = AvailablePortSystemPropertyTestRule
-            .create(TestConstants.SYS_PROP_NAME_PORT);
-
-    private static final MongoDbTestRule mongoDbTestRule = new MongoDbTestRule(mongoDbPortTestRule.getName(),
-            MongoDbTestTestRuleTestJava8.class, LoggingTarget.NULL);
-
-    @ClassRule
-    public static RuleChain mongoDbChain = RuleChainFactory.create(mongoDbPortTestRule, mongoDbTestRule);
-
-    @BeforeClass
-    public static void beforeClass() {
-        Assume.assumeTrue(SystemUtils.isJavaVersionAtLeast(JavaVersion.JAVA_1_8));
-    }
-
-    @Test
-    public void testAccess() {
-        final MongoIterable<String> databaseNames = mongoDbTestRule.getMongoClient().listDatabaseNames();
-        Assert.assertNotNull(databaseNames);
-        Assert.assertNotNull(databaseNames.first());
-    }
-
-    @Test
-    public void testMongoDbTestRule() {
-        Assert.assertNotNull(mongoDbTestRule);
-        Assert.assertNotNull(mongoDbTestRule.getStarter());
-        Assert.assertNotNull(mongoDbTestRule.getMongoClient());
-        Assert.assertNotNull(mongoDbTestRule.getMongodExecutable());
-        Assert.assertNotNull(mongoDbTestRule.getMongodProcess());
-    }
-}