Index: trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 9840)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanel.java	(revision 9841)
@@ -240,5 +240,6 @@
 
     public void setUploadStrategySpecification(UploadStrategySpecification strategy) {
-        if (strategy == null) return;
+        if (strategy == null)
+            return;
         rbStrategy.get(strategy.getStrategy()).setSelected(true);
         tfChunkSize.setEnabled(strategy.getStrategy() == UploadStrategy.CHUNKED_DATASET_STRATEGY);
@@ -256,12 +257,14 @@
         int chunkSize = getChunkSize();
         UploadStrategySpecification spec = new UploadStrategySpecification();
-        switch(strategy) {
-        case INDIVIDUAL_OBJECTS_STRATEGY:
-        case SINGLE_REQUEST_STRATEGY:
-            spec.setStrategy(strategy);
-            break;
-        case CHUNKED_DATASET_STRATEGY:
-            spec.setStrategy(strategy).setChunkSize(chunkSize);
-            break;
+        if (strategy != null) {
+            switch(strategy) {
+            case INDIVIDUAL_OBJECTS_STRATEGY:
+            case SINGLE_REQUEST_STRATEGY:
+                spec.setStrategy(strategy);
+                break;
+            case CHUNKED_DATASET_STRATEGY:
+                spec.setStrategy(strategy).setChunkSize(chunkSize);
+                break;
+            }
         }
         if (pnlMultiChangesetPolicyPanel.isVisible()) {
Index: trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java
===================================================================
--- trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java	(revision 9840)
+++ trunk/src/org/openstreetmap/josm/gui/io/UploadStrategySpecification.java	(revision 9841)
@@ -35,15 +35,15 @@
 
     /**
-     * Clones another upload strategy. If other is null,assumes default
-     * values.
+     * Clones another upload strategy. If other is null, assumes default values.
      *
      * @param other the other upload strategy
      */
     public UploadStrategySpecification(UploadStrategySpecification other) {
-        if (other == null) return;
-        this.strategy = other.strategy;
-        this.chunkSize = other.chunkSize;
-        this.policy = other.policy;
-        this.closeChangesetAfterUpload = other.closeChangesetAfterUpload;
+        if (other != null) {
+            this.strategy = other.strategy;
+            this.chunkSize = other.chunkSize;
+            this.policy = other.policy;
+            this.closeChangesetAfterUpload = other.closeChangesetAfterUpload;
+        }
     }
 
@@ -93,5 +93,6 @@
 
     public int getNumRequests(int numObjects) {
-        if (numObjects <= 0) return 0;
+        if (numObjects <= 0)
+            return 0;
         switch(strategy) {
         case INDIVIDUAL_OBJECTS_STRATEGY: return numObjects;
@@ -114,6 +115,8 @@
     @Override
     public boolean equals(Object obj) {
-        if (this == obj) return true;
-        if (obj == null || getClass() != obj.getClass()) return false;
+        if (this == obj)
+            return true;
+        if (obj == null || getClass() != obj.getClass())
+            return false;
         UploadStrategySpecification that = (UploadStrategySpecification) obj;
         return chunkSize == that.chunkSize &&
Index: trunk/test/unit/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanelTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanelTest.java	(revision 9840)
+++ trunk/test/unit/org/openstreetmap/josm/gui/io/UploadStrategySelectionPanelTest.java	(revision 9841)
@@ -2,9 +2,13 @@
 package org.openstreetmap.josm.gui.io;
 
-import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertEquals;
 
 import org.junit.BeforeClass;
 import org.junit.Test;
 import org.openstreetmap.josm.JOSMFixture;
+import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.io.OsmApi;
+import org.openstreetmap.josm.io.OsmApiInitializationException;
+import org.openstreetmap.josm.io.OsmTransferCanceledException;
 
 /**
@@ -19,4 +23,9 @@
     public static void setUpBeforeClass() {
         JOSMFixture.createUnitTestFixture().init();
+        try {
+            OsmApi.getOsmApi().initialize(null);
+        } catch (OsmTransferCanceledException | OsmApiInitializationException e) {
+            Main.error(e);
+        }
     }
 
@@ -26,5 +35,27 @@
     @Test
     public void testUploadStrategySelectionPanel() {
-        assertNotNull(new UploadStrategySelectionPanel());
+        UploadStrategySelectionPanel p = new UploadStrategySelectionPanel();
+        p.setNumUploadedObjects(Integer.MAX_VALUE);
+        p.rememberUserInput();
+        p.initFromPreferences();
+        p.initEditingOfChunkSize();
+    }
+
+    /**
+     * Test of {@link UploadStrategySelectionPanel#setUploadStrategySpecification}
+     *       / {@link UploadStrategySelectionPanel#getUploadStrategySpecification}.
+     */
+    @Test
+    public void testUploadStrategySpecification() {
+        UploadStrategySelectionPanel p = new UploadStrategySelectionPanel();
+
+        UploadStrategySpecification def = new UploadStrategySpecification();
+        assertEquals(def, p.getUploadStrategySpecification());
+        p.setUploadStrategySpecification(null);
+        assertEquals(def, p.getUploadStrategySpecification());
+
+        UploadStrategySpecification strat = new UploadStrategySpecification().setStrategy(UploadStrategy.INDIVIDUAL_OBJECTS_STRATEGY);
+        p.setUploadStrategySpecification(strat);
+        assertEquals(strat, p.getUploadStrategySpecification());
     }
 }
