Index: trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java	(revision 16667)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java	(revision 16672)
@@ -15,5 +15,4 @@
 import java.util.function.Supplier;
 
-import javax.swing.JButton;
 import javax.swing.JOptionPane;
 
@@ -21,15 +20,11 @@
 import org.junit.Test;
 import org.openstreetmap.josm.TestUtils;
-import org.openstreetmap.josm.gui.ExtendedDialog;
 import org.openstreetmap.josm.gui.io.UploadDialog.UploadAction;
 import org.openstreetmap.josm.io.UploadStrategySpecification;
 import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
-import org.openstreetmap.josm.testutils.mockers.ExtendedDialogMocker;
 import org.openstreetmap.josm.testutils.mockers.WindowMocker;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
-import mockit.Invocation;
-import mockit.Mock;
 
 /**
@@ -119,90 +114,4 @@
         MockUploadDialog uploadDialog = new MockUploadDialog(null, null);
         new UploadDialog.CancelAction(uploadDialog).actionPerformed(null);
-    }
-
-    /**
-     * Test of {@link UploadDialog.UploadAction} class.
-     */
-    @Test
-    public void testUploadAction() {
-        TestUtils.assumeWorkingJMockit();
-        ExtendedDialogMocker edMocker = new ExtendedDialogMocker() {
-            @Mock
-            void setupDialog(Invocation invocation) throws Exception {
-                if (GraphicsEnvironment.isHeadless()) {
-                    final int nButtons = ((String[]) TestUtils.getPrivateField(
-                            ExtendedDialog.class, invocation.getInvokedInstance(), "bTexts")).length;
-                    @SuppressWarnings("unchecked")
-                    final List<JButton> buttons = (List<JButton>) TestUtils.getPrivateField(
-                            ExtendedDialog.class, invocation.getInvokedInstance(), "buttons");
-
-                    for (int i = 0; i < nButtons; i++) {
-                        buttons.add(new JButton());
-                    }
-                } else {
-                    invocation.proceed();
-                }
-            }
-        };
-        edMocker.getMockResultMap().put("<html>Your upload comment is <i>empty</i>, or <i>very short</i>.<br /><br />This is "
-                + "technically allowed, but please consider that many users who are<br />watching changes "
-                + "in their area depend on meaningful changeset comments<br />to understand what is going "
-                + "on!<br /><br />If you spend a minute now to explain your change, you will make life<br />"
-                + "easier for many other mappers.</html>", "Revise");
-        edMocker.getMockResultMap().put("<html>You did not specify a source for your changes.<br />It is technically allowed, "
-                + "but this information helps<br />other users to understand the origins of the data."
-                + "<br /><br />If you spend a minute now to explain your change, you will make life"
-                + "<br />easier for many other mappers.</html>", "Revise");
-
-        MockUploadDialog uploadDialog = new MockUploadDialog("comment", "source");
-        new UploadDialog.UploadAction(uploadDialog).actionPerformed(null);
-
-        assertEquals(1, uploadDialog.handleMissingCommentCalls);
-        assertEquals(0, uploadDialog.handleMissingSourceCalls);
-        assertEquals(1, edMocker.getInvocationLog().size());
-        Object[] invocationLogEntry = edMocker.getInvocationLog().get(0);
-        assertEquals(1, (int) invocationLogEntry[0]);
-        assertEquals("Please revise upload comment", invocationLogEntry[2]);
-        edMocker.resetInvocationLog();
-
-        uploadDialog = new MockUploadDialog("", "source");
-        new UploadDialog.UploadAction(uploadDialog).actionPerformed(null);
-
-        assertEquals(1, uploadDialog.handleMissingCommentCalls);
-        assertEquals(0, uploadDialog.handleMissingSourceCalls);
-        assertEquals(1, edMocker.getInvocationLog().size());
-        invocationLogEntry = edMocker.getInvocationLog().get(0);
-        assertEquals(1, (int) invocationLogEntry[0]);
-        assertEquals("Please revise upload comment", invocationLogEntry[2]);
-        edMocker.resetInvocationLog();
-
-        uploadDialog = new MockUploadDialog("comment", "");
-        new UploadDialog.UploadAction(uploadDialog).actionPerformed(null);
-
-        assertEquals(1, uploadDialog.handleMissingCommentCalls);
-        assertEquals(0, uploadDialog.handleMissingSourceCalls);
-        assertEquals(1, edMocker.getInvocationLog().size());
-        invocationLogEntry = edMocker.getInvocationLog().get(0);
-        assertEquals(1, (int) invocationLogEntry[0]);
-        assertEquals("Please revise upload comment", invocationLogEntry[2]);
-        edMocker.resetInvocationLog();
-
-        uploadDialog = new MockUploadDialog("a comment long enough", "");
-        new UploadDialog.UploadAction(uploadDialog).actionPerformed(null);
-
-        assertEquals(0, uploadDialog.handleMissingCommentCalls);
-        assertEquals(1, uploadDialog.handleMissingSourceCalls);
-        assertEquals(1, edMocker.getInvocationLog().size());
-        invocationLogEntry = edMocker.getInvocationLog().get(0);
-        assertEquals(1, (int) invocationLogEntry[0]);
-        assertEquals("Please specify a changeset source", invocationLogEntry[2]);
-        edMocker.resetInvocationLog();
-
-        uploadDialog = new MockUploadDialog("a comment long enough", "a source long enough");
-        new UploadDialog.UploadAction(uploadDialog).actionPerformed(null);
-
-        assertEquals(0, uploadDialog.handleMissingCommentCalls);
-        assertEquals(0, uploadDialog.handleMissingSourceCalls);
-        assertEquals(0, edMocker.getInvocationLog().size());
     }
 
Index: trunk/test/unit/org/openstreetmap/josm/gui/io/UploadTextComponentValidatorTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/UploadTextComponentValidatorTest.java	(revision 16672)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/UploadTextComponentValidatorTest.java	(revision 16672)
@@ -0,0 +1,52 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.gui.io;
+
+import static org.hamcrest.CoreMatchers.containsString;
+import static org.hamcrest.MatcherAssert.assertThat;
+
+import javax.swing.JLabel;
+import javax.swing.JTextField;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+public class UploadTextComponentValidatorTest {
+
+    /**
+     * Setup test.
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().preferences();
+
+    /**
+     * Unit test of {@link UploadTextComponentValidator.UploadCommentValidator}
+     */
+    @Test
+    public void testUploadCommentValidator() {
+        JTextField textField = new JTextField();
+        JLabel feedback = new JLabel();
+        new UploadTextComponentValidator.UploadCommentValidator(textField, feedback);
+        assertThat(feedback.getText(), containsString("Your upload comment is <i>empty</i>, or <i>very short</i>"));
+        textField.setText("a comment long enough");
+        assertThat(feedback.getText(), containsString("Thank you for providing a changeset comment"));
+        textField.setText("a");
+        assertThat(feedback.getText(), containsString("Your upload comment is <i>empty</i>, or <i>very short</i>"));
+    }
+
+    /**
+     * Unit test of {@link UploadTextComponentValidator.UploadSourceValidator}
+     */
+    @Test
+    public void testUploadSourceValidator() {
+        JTextField textField = new JTextField();
+        JLabel feedback = new JLabel();
+        new UploadTextComponentValidator.UploadSourceValidator(textField, feedback);
+        assertThat(feedback.getText(), containsString("You did not specify a source for your changes"));
+        textField.setText("a comment long enough");
+        assertThat(feedback.getText(), containsString("Thank you for providing the data source"));
+    }
+}
