Index: trunk/test/unit/org/openstreetmap/josm/TestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 14969)
+++ trunk/test/unit/org/openstreetmap/josm/TestUtils.java	(revision 14977)
@@ -54,4 +54,5 @@
 import org.openstreetmap.josm.testutils.mockers.WindowMocker;
 import org.openstreetmap.josm.tools.JosmRuntimeException;
+import org.openstreetmap.josm.tools.ReflectionUtils;
 import org.openstreetmap.josm.tools.Utils;
 import org.openstreetmap.josm.tools.WikiReader;
@@ -413,5 +414,5 @@
             Method values = enumClass.getMethod("values");
             Method valueOf = enumClass.getMethod("valueOf", String.class);
-            Utils.setObjectsAccessible(values, valueOf);
+            ReflectionUtils.setObjectsAccessible(values, valueOf);
             for (Object o : (Object[]) values.invoke(null)) {
                 assertEquals(o, valueOf.invoke(null, ((Enum<?>) o).name()));
Index: trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java	(revision 14969)
+++ trunk/test/unit/org/openstreetmap/josm/actions/CreateCircleActionTest.java	(revision 14977)
@@ -21,6 +21,6 @@
 import org.openstreetmap.josm.tools.GeoPropertyIndex;
 import org.openstreetmap.josm.tools.Geometry;
+import org.openstreetmap.josm.tools.ReflectionUtils;
 import org.openstreetmap.josm.tools.RightAndLefthandTraffic;
-import org.openstreetmap.josm.tools.Utils;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -118,5 +118,5 @@
         // Mock left/right hand traffic database
         Field rlCache = RightAndLefthandTraffic.class.getDeclaredField("rlCache");
-        Utils.setObjectsAccessible(rlCache);
+        ReflectionUtils.setObjectsAccessible(rlCache);
         Object origRlCache = rlCache.get(null);
         rlCache.set(null, new GeoPropertyIndex<>(new ConstantTrafficHand(true), 24));
Index: trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java	(revision 14969)
+++ trunk/test/unit/org/openstreetmap/josm/actions/mapmode/SelectActionTest.java	(revision 14977)
@@ -27,5 +27,5 @@
 import org.openstreetmap.josm.spi.preferences.Config;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
-import org.openstreetmap.josm.tools.Utils;
+import org.openstreetmap.josm.tools.ReflectionUtils;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -42,5 +42,5 @@
             super(mapFrame);
             Field mv = SelectAction.class.getDeclaredField("mv");
-            Utils.setObjectsAccessible(mv);
+            ReflectionUtils.setObjectsAccessible(mv);
             mv.set(this, new MapViewMock(new MainLayerManager()));
         }
Index: trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java	(revision 14969)
+++ trunk/test/unit/org/openstreetmap/josm/gui/TableCellRendererTest.java	(revision 14977)
@@ -20,5 +20,5 @@
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 import org.openstreetmap.josm.tools.Logging;
-import org.openstreetmap.josm.tools.Utils;
+import org.openstreetmap.josm.tools.ReflectionUtils;
 
 import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
@@ -99,5 +99,5 @@
             c = klass.getDeclaredConstructor();
         }
-        Utils.setObjectsAccessible(c);
+        ReflectionUtils.setObjectsAccessible(c);
         if (needOuterClass) {
             return c.newInstance(createInstance(klass.getDeclaringClass()));
Index: trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java	(revision 14969)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/UploadDialogTest.java	(revision 14977)
@@ -4,10 +4,14 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
 import java.awt.GraphicsEnvironment;
+import java.util.Arrays;
 import java.util.List;
 import java.util.Map;
 import java.util.concurrent.ConcurrentHashMap;
+import java.util.function.Supplier;
+
 import javax.swing.JButton;
 import javax.swing.JOptionPane;
@@ -15,17 +19,17 @@
 import org.junit.Rule;
 import org.junit.Test;
+import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.gui.ExtendedDialog;
-import org.openstreetmap.josm.TestUtils;
 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 com.google.common.collect.ImmutableMap;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 import mockit.Invocation;
 import mockit.Mock;
-
-import com.google.common.collect.ImmutableMap;
-
-import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
 
 /**
@@ -96,4 +100,9 @@
         public Map<String, String> getTags(boolean keepEmpty) {
             return new ConcurrentHashMap<>();
+        }
+
+        @Override
+        public void forceUpdateActiveField() {
+            // Do nothing
         }
     }
@@ -214,3 +223,38 @@
         assertTrue(UploadDialog.UploadAction.isUploadCommentTooShort("\u0860"));
     }
+
+    private static void doTestGetLastChangesetTagFromHistory(String historyKey, Supplier<String> methodToTest, String def) {
+        Config.getPref().putList(historyKey, null);
+        Config.getPref().putInt(BasicUploadSettingsPanel.HISTORY_LAST_USED_KEY, 0);
+        Config.getPref().putInt(BasicUploadSettingsPanel.HISTORY_MAX_AGE_KEY, 30);
+        assertNull(methodToTest.get());          // age NOK (history empty)
+        Config.getPref().putList(historyKey, Arrays.asList("foo"));
+        assertNull(methodToTest.get());          // age NOK (history not empty)
+        Config.getPref().putLong(BasicUploadSettingsPanel.HISTORY_LAST_USED_KEY, System.currentTimeMillis() / 1000);
+        assertEquals("foo", methodToTest.get()); // age OK, history not empty
+        Config.getPref().putList(historyKey, null);
+        assertEquals(def, methodToTest.get());   // age OK, history empty
+    }
+
+    /**
+     * Test of {@link UploadDialog#getLastChangesetCommentFromHistory} method.
+     */
+    @Test
+    public void testGetLastChangesetCommentFromHistory() {
+        doTestGetLastChangesetTagFromHistory(
+                BasicUploadSettingsPanel.HISTORY_KEY,
+                UploadDialog::getLastChangesetCommentFromHistory,
+                null);
+    }
+
+    /**
+     * Test of {@link UploadDialog#getLastChangesetSourceFromHistory} method.
+     */
+    @Test
+    public void testGetLastChangesetSourceFromHistory() {
+        doTestGetLastChangesetTagFromHistory(
+                BasicUploadSettingsPanel.SOURCE_HISTORY_KEY,
+                UploadDialog::getLastChangesetSourceFromHistory,
+                BasicUploadSettingsPanel.getDefaultSources().get(0));
+    }
 }
