Index: trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java	(revision 10093)
+++ trunk/test/unit/org/openstreetmap/josm/gui/MainApplicationTest.java	(revision 10093)
@@ -0,0 +1,61 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+
+import java.util.Collection;
+
+import javax.swing.event.ChangeEvent;
+import javax.swing.event.ChangeListener;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.gui.SplashScreen.SplashProgressMonitor;
+import org.openstreetmap.josm.plugins.PluginHandler;
+import org.openstreetmap.josm.plugins.PluginInformation;
+
+/**
+ * Unit tests of {@link MainApplication} class.
+ */
+public class MainApplicationTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init(true);
+    }
+
+    /**
+     * Test of {@link MainApplication#updateAndLoadEarlyPlugins} and {@link MainApplication#loadLatePlugins} methods.
+     */
+    @Test
+    public void testUpdateAndLoadPlugins() {
+        final String old = System.getProperty("josm.plugins");
+        try {
+            System.setProperty("josm.plugins", "buildings_tools,plastic_laf");
+            SplashProgressMonitor monitor = new SplashProgressMonitor("foo", new ChangeListener() {
+                @Override
+                public void stateChanged(ChangeEvent e) {
+                    // Do nothing
+                }
+            });
+            Collection<PluginInformation> plugins = MainApplication.updateAndLoadEarlyPlugins(null, monitor);
+            assertEquals(2, plugins.size());
+            assertNotNull(PluginHandler.getPlugin("plastic_laf"));
+            assertNull(PluginHandler.getPlugin("buildings_tools"));
+            MainApplication.loadLatePlugins(null, monitor, plugins);
+            assertNotNull(PluginHandler.getPlugin("buildings_tools"));
+        } finally {
+            if (old != null) {
+                System.setProperty("josm.plugins", old);
+            } else {
+                System.clearProperty("josm.plugins");
+            }
+        }
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java	(revision 10089)
+++ trunk/test/unit/org/openstreetmap/josm/plugins/PluginHandlerTest.java	(revision 10093)
@@ -2,7 +2,10 @@
 package org.openstreetmap.josm.plugins;
 
+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 java.util.ArrayList;
 import java.util.Arrays;
 import java.util.List;
@@ -11,4 +14,5 @@
 import org.junit.Test;
 import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
 import org.openstreetmap.josm.plugins.PluginHandler.DeprecatedPlugin;
 import org.openstreetmap.josm.tools.Utils;
@@ -58,3 +62,25 @@
         }
     }
+
+    /**
+     * Unit test of {@link PluginHandler#filterDeprecatedPlugins}.
+     */
+    @Test
+    public void testFilterDeprecatedPlugins() {
+        List<String> plugins = new ArrayList<>(Arrays.asList("foo", "bar", "imagery"));
+        PluginHandler.filterDeprecatedPlugins(Main.parent, plugins);
+        assertEquals(2, plugins.size());
+        assertFalse(plugins.contains("imagery"));
+    }
+
+    /**
+     * Unit test of {@link PluginHandler#filterUnmaintainedPlugins}.
+     */
+    @Test
+    public void testFilterUnmaintainedPlugins() {
+        List<String> plugins = new ArrayList<>(Arrays.asList("foo", "bar", "gpsbabelgui"));
+        PluginHandler.filterUnmaintainedPlugins(Main.parent, plugins);
+        assertEquals(2, plugins.size());
+        assertFalse(plugins.contains("gpsbabelgui"));
+    }
 }
