Index: trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 12125)
+++ trunk/test/unit/org/openstreetmap/josm/JOSMFixture.java	(revision 12128)
@@ -6,4 +6,5 @@
 import static org.junit.Assert.fail;
 
+import java.awt.BorderLayout;
 import java.io.File;
 import java.io.IOException;
@@ -14,6 +15,9 @@
 import java.util.TimeZone;
 
+import javax.swing.JPanel;
+
 import org.openstreetmap.josm.data.projection.Projections;
 import org.openstreetmap.josm.gui.MainApplication;
+import org.openstreetmap.josm.gui.MainPanel;
 import org.openstreetmap.josm.gui.layer.LayerManagerTest.TestLayer;
 import org.openstreetmap.josm.gui.preferences.ToolbarPreferences;
@@ -146,4 +150,10 @@
         assertNull(Main.getLayerManager().getActiveLayer());
 
+        if (Main.contentPanePrivate == null) {
+            Main.contentPanePrivate = new JPanel(new BorderLayout());
+        }
+        if (Main.mainPanel == null) {
+            Main.mainPanel = new MainPanel(Main.getLayerManager());
+        }
         if (Main.toolbar == null) {
             Main.toolbar = new ToolbarPreferences();
