Index: trunk/src/org/openstreetmap/josm/gui/MapFrame.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 9995)
+++ trunk/src/org/openstreetmap/josm/gui/MapFrame.java	(revision 9996)
@@ -137,4 +137,5 @@
     public SelectionListDialog selectionListDialog;
     public PropertiesDialog propertiesDialog;
+    public MapPaintDialog mapPaintDialog;
     public NotesDialog noteDialog;
 
@@ -246,5 +247,5 @@
         addToggleDialog(filterDialog = new FilterDialog());
         addToggleDialog(new ChangesetDialog(), true);
-        addToggleDialog(new MapPaintDialog());
+        addToggleDialog(mapPaintDialog = new MapPaintDialog());
         addToggleDialog(noteDialog = new NotesDialog());
         toolBarToggle.setFloatable(false);
Index: trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 9995)
+++ trunk/src/org/openstreetmap/josm/gui/conflict/pair/properties/PropertiesMerger.java	(revision 9996)
@@ -84,4 +84,5 @@
         JLabel lblMyVersion = new JLabel(tr("My version"));
         lblMyVersion.setToolTipText(tr("Properties in my dataset, i.e. the local dataset"));
+        lblMyVersion.setLabelFor(mineVersionInfo);
         add(lblMyVersion, gc);
 
@@ -95,4 +96,5 @@
         JLabel lblTheirVersion = new JLabel(tr("Their version"));
         lblTheirVersion.setToolTipText(tr("Properties in their dataset, i.e. the server dataset"));
+        lblMyVersion.setLabelFor(theirVersionInfo);
         add(lblTheirVersion, gc);
 
@@ -106,5 +108,4 @@
         gc.gridx = 5;
         add(theirVersionInfo, gc);
-
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 9995)
+++ trunk/src/org/openstreetmap/josm/gui/dialogs/MapPaintDialog.java	(revision 9996)
@@ -572,6 +572,6 @@
             final JTabbedPane tabs = new JTabbedPane();
 
-            tabs.add("Info", buildInfoPanel(s));
             JLabel lblInfo = new JLabel(tr("Info"));
+            lblInfo.setLabelFor(tabs.add("Info", buildInfoPanel(s)));
             lblInfo.setFont(lblInfo.getFont().deriveFont(Font.PLAIN));
             tabs.setTabComponentAt(0, lblInfo);
@@ -583,6 +583,6 @@
 
             final JPanel pSource = new JPanel(new GridBagLayout());
-            tabs.addTab("Source", pSource);
             JLabel lblSource = new JLabel(tr("Source"));
+            lblSource.setLabelFor(tabs.add("Source", pSource));
             lblSource.setFont(lblSource.getFont().deriveFont(Font.PLAIN));
             tabs.setTabComponentAt(3, lblSource);
@@ -615,4 +615,5 @@
             if (items.isEmpty()) {
                 JLabel lblErrors = new JLabel(tr(title));
+                lblErrors.setLabelFor(pErrors);
                 lblErrors.setFont(lblInfo.getFont().deriveFont(Font.PLAIN));
                 lblErrors.setEnabled(false);
@@ -621,4 +622,5 @@
             } else {
                 JLabel lblErrors = new JLabel(tr(title), icon, JLabel.HORIZONTAL);
+                lblErrors.setLabelFor(pErrors);
                 tabs.setTabComponentAt(pos, lblErrors);
             }
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java	(revision 9995)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRenderer.java	(revision 9996)
@@ -17,7 +17,7 @@
 class UploadAndSaveProgressRenderer extends JPanel implements ProgressRenderer, PropertyChangeListener {
 
-    private JLabel lblTaskTitle;
-    private JLabel lblCustomText;
-    private JProgressBar progressBar;
+    private final JLabel lblTaskTitle = new JLabel("");
+    private final JLabel lblCustomText = new JLabel("");
+    private final JProgressBar progressBar = new JProgressBar(JProgressBar.HORIZONTAL);
 
     /**
@@ -39,21 +39,13 @@
         gc.weighty = 0.0;
         gc.insets = new Insets(5, 0, 0, 5);
-        add(lblTaskTitle = new JLabel(""), gc);
+        add(lblTaskTitle, gc);
+        lblTaskTitle.setLabelFor(lblCustomText);
 
-        gc.gridx = 0;
         gc.gridy = 1;
-        gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.weightx = 1.0;
-        gc.weighty = 0.0;
-        gc.insets = new Insets(5, 0, 0, 5);
-        add(lblCustomText = new JLabel(""), gc);
+        add(lblCustomText, gc);
+        lblCustomText.setLabelFor(progressBar);
 
-        gc.gridx = 0;
         gc.gridy = 2;
-        gc.fill = GridBagConstraints.HORIZONTAL;
-        gc.weightx = 1.0;
-        gc.weighty = 0.0;
-        gc.insets = new Insets(5, 0, 0, 5);
-        add(progressBar = new JProgressBar(JProgressBar.HORIZONTAL), gc);
+        add(progressBar, gc);
     }
 
@@ -91,9 +83,5 @@
     public void propertyChange(PropertyChangeEvent evt) {
         if (evt.getPropertyName().equals(SaveLayersModel.MODE_PROP)) {
-            Mode mode = (Mode) evt.getNewValue();
-            switch(mode) {
-                case EDITING_DATA: setVisible(false); break;
-                case UPLOADING_AND_SAVING: setVisible(true); break;
-            }
+            setVisible(Mode.UPLOADING_AND_SAVING.equals(evt.getNewValue()));
         }
         getParent().validate();
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 9995)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadParameterSummaryPanel.java	(revision 9996)
@@ -118,4 +118,5 @@
         lblWarning = new JLabel("");
         lblWarning.setVisible(false);
+        lblWarning.setLabelFor(jepMessage);
         lblWarning.setIcon(ImageProvider.get("warning-small"));
         lblWarning.setBorder(BorderFactory.createEmptyBorder(5, 5, 5, 5));
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java	(revision 9995)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/ComboMultiSelect.java	(revision 9996)
@@ -388,8 +388,8 @@
         p.add(label, GBC.std().insets(0, 0, 10, 0));
         addToPanelAnchor(p, default_, presetInitiallyMatches);
+        label.setLabelFor(component);
         component.setToolTipText(getKeyTooltipText());
 
         return true;
-
     }
 
Index: trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java	(revision 9995)
+++ trunk/src/org/openstreetmap/josm/gui/tagging/presets/items/Text.java	(revision 9996)
@@ -180,4 +180,5 @@
         final JLabel label = new JLabel(locale_text + ':');
         label.setToolTipText(getKeyTooltipText());
+        label.setLabelFor(value);
         p.add(label, GBC.std().insets(0, 0, 10, 0));
         p.add(value, GBC.eol().fill(GBC.HORIZONTAL));
Index: trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/dialogs/MapPaintDialogTest.java	(revision 9996)
@@ -0,0 +1,29 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.dialogs;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
+
+/**
+ * Unit tests of {@link MapPaintDialog} class.
+ */
+public class MapPaintDialogTest {
+
+    /**
+     * Setup tests
+     */
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init(true);
+    }
+
+    /**
+     * Unit test of {@link MapPaintDialog.InfoAction} class.
+     */
+    @Test
+    public void testInfoAction() {
+        Main.map.mapPaintDialog.new InfoAction().actionPerformed(null);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRendererTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRendererTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/UploadAndSaveProgressRendererTest.java	(revision 9996)
@@ -0,0 +1,48 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.io;
+
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.beans.PropertyChangeEvent;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.gui.io.SaveLayersModel.Mode;
+
+/**
+ * Unit tests of {@link UploadAndSaveProgressRenderer} class.
+ */
+public class UploadAndSaveProgressRendererTest {
+
+    /**
+     * Setup tests
+     */
+    @BeforeClass
+    public static void setUpBeforeClass() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test of {@link UploadAndSaveProgressRenderer#UploadAndSaveProgressRenderer}.
+     */
+    @Test
+    public void testUploadAndSaveProgressRenderer() {
+        JPanel parent = new JPanel();
+        UploadAndSaveProgressRenderer r = new UploadAndSaveProgressRenderer();
+        parent.add(r);
+        r.setCustomText(null);
+        r.setIndeterminate(true);
+        r.setMaximum(10);
+        r.setTaskTitle(null);
+        r.setValue(5);
+        r.propertyChange(new PropertyChangeEvent(this, "", null, null));
+        r.propertyChange(new PropertyChangeEvent(this, SaveLayersModel.MODE_PROP, null, Mode.UPLOADING_AND_SAVING));
+        assertTrue(r.isVisible());
+        r.propertyChange(new PropertyChangeEvent(this, SaveLayersModel.MODE_PROP, null, Mode.EDITING_DATA));
+        assertFalse(r.isVisible());
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckGroupTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckGroupTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckGroupTest.java	(revision 9996)
@@ -0,0 +1,42 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link CheckGroup} class.
+ */
+public class CheckGroupTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link CheckGroup#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        CheckGroup cg = new CheckGroup();
+        cg.columns = "1";
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertFalse(cg.addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/CheckTest.java	(revision 9996)
@@ -0,0 +1,39 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Check} class.
+ */
+public class CheckTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Check#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertTrue(new Check().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ComboTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ComboTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ComboTest.java	(revision 9996)
@@ -0,0 +1,39 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Combo} class.
+ */
+public class ComboTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Combo#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertTrue(new Combo().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ItemSeparatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ItemSeparatorTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/ItemSeparatorTest.java	(revision 9996)
@@ -0,0 +1,40 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link ItemSeparator} class.
+ */
+public class ItemSeparatorTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link ItemSeparator#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertFalse(new ItemSeparator().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/KeyTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/KeyTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/KeyTest.java	(revision 9996)
@@ -0,0 +1,39 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Key} class.
+ */
+public class KeyTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Key#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertFalse(new Key().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertEquals(0, p.getComponentCount());
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LabelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LabelTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LabelTest.java	(revision 9996)
@@ -0,0 +1,39 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Label} class.
+ */
+public class LabelTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Label#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertTrue(new Label().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LinkTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LinkTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/LinkTest.java	(revision 9996)
@@ -0,0 +1,50 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Link} class.
+ */
+public class LinkTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Link#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        Link l = new Link();
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertFalse(l.addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertEquals(0, p.getComponentCount());
+
+        l.href = Main.getJOSMWebsite();
+        assertFalse(l.addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+
+        l.locale_href = Main.getJOSMWebsite();
+        assertFalse(l.addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/MultiSelectTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/MultiSelectTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/MultiSelectTest.java	(revision 9996)
@@ -0,0 +1,39 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link MultiSelect} class.
+ */
+public class MultiSelectTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link MultiSelect#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertTrue(new MultiSelect().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/OptionalTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/OptionalTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/OptionalTest.java	(revision 9996)
@@ -0,0 +1,40 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Optional} class.
+ */
+public class OptionalTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Optional#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertFalse(new Optional().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/PresetLinkTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/PresetLinkTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/PresetLinkTest.java	(revision 9996)
@@ -0,0 +1,44 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+import org.openstreetmap.josm.gui.tagging.presets.TaggingPresets;
+
+/**
+ * Unit tests of {@link PresetLink} class.
+ */
+public class PresetLinkTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+        TaggingPresets.readFromPreferences();
+    }
+
+    /**
+     * Unit test for {@link PresetLink#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        PresetLink l = new PresetLink();
+        l.preset_name = "River";
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertFalse(l.addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/RolesTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/RolesTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/RolesTest.java	(revision 9996)
@@ -0,0 +1,40 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Roles} class.
+ */
+public class RolesTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Roles#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertFalse(new Roles().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/SpaceTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/SpaceTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/SpaceTest.java	(revision 9996)
@@ -0,0 +1,40 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Space} class.
+ */
+public class SpaceTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Space#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertFalse(new Space().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/TextTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/TextTest.java	(revision 9996)
+++ trunk/test/unit/org/openstreetmap/josm/gui/tagging/presets/items/TextTest.java	(revision 9996)
@@ -0,0 +1,39 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.tagging.presets.items;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertTrue;
+
+import java.util.Collections;
+
+import javax.swing.JPanel;
+
+import org.junit.BeforeClass;
+import org.junit.Test;
+import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.data.osm.OsmPrimitive;
+
+/**
+ * Unit tests of {@link Text} class.
+ */
+public class TextTest {
+
+    /**
+     * Setup test.
+     */
+    @BeforeClass
+    public static void setUp() {
+        JOSMFixture.createUnitTestFixture().init();
+    }
+
+    /**
+     * Unit test for {@link Text#addToPanel}.
+     */
+    @Test
+    public void testAddToPanel() {
+        JPanel p = new JPanel();
+        assertEquals(0, p.getComponentCount());
+        assertTrue(new Text().addToPanel(p, Collections.<OsmPrimitive>emptyList(), false));
+        assertTrue(p.getComponentCount() > 0);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTest.java	(revision 9995)
+++ trunk/test/unit/org/openstreetmap/josm/io/CertificateAmendmentTest.java	(revision 9996)
@@ -20,5 +20,5 @@
     /**
      * Setup test.
-     * @throws java.io.IOException in case of I/O exception
+     * @throws IOException in case of I/O error
      */
     @BeforeClass
@@ -28,4 +28,8 @@
     }
 
+    /**
+     * Test a well-known certificate.
+     * @throws IOException in case of I/O error
+     */
     @Test
     public void testDefault() throws IOException {
@@ -34,4 +38,8 @@
     }
 
+    /**
+     * Test <a href="https://letsencrypt.org">Let's Encrypt</a>.
+     * @throws IOException in case of I/O error
+     */
     @Test
     public void testLetsEncrypt() throws IOException {
@@ -42,4 +50,8 @@
     }
 
+    /**
+     * Test <a href="https://www.startssl.com">StartSSL</a>.
+     * @throws IOException in case of I/O error
+     */
     @Test
     public void testStartSSL() throws IOException {
@@ -48,4 +60,8 @@
     }
 
+    /**
+     * Test a broken certificate.
+     * @throws IOException in case of I/O error
+     */
     @Test
     public void testBrokenCert() throws IOException {
