Index: applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/commands/MapillaryRecordTest.java
===================================================================
--- applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/commands/MapillaryRecordTest.java	(revision 31476)
+++ applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/commands/MapillaryRecordTest.java	(revision 31482)
@@ -41,18 +41,21 @@
   @Test
   public void commandTest() {
-    MapillaryCommand cmd1 = new CommandMoveImage(
+    MapillaryCommand cmd12 = new CommandMoveImage(
         Arrays.asList(new MapillaryAbstractImage[] { this.img1, this.img2 }),
         0.1, 0.1);
-    MapillaryCommand cmd2 = new CommandMoveImage(
+    MapillaryCommand cmd23 = new CommandMoveImage(
         Arrays.asList(new MapillaryAbstractImage[] { this.img2, this.img3 }),
         0.1, 0.1);
-    MapillaryCommand cmd3 = new CommandMoveImage(
+    MapillaryCommand cmd13 = new CommandMoveImage(
         Arrays.asList(new MapillaryAbstractImage[] { this.img1, this.img3 }),
+        0.1, 0.1);
+    MapillaryCommand cmd1 = new CommandMoveImage(
+        Arrays.asList(new MapillaryAbstractImage[] { this.img1 }),
         0.1, 0.1);
     MapillaryCommand cmd31 = new CommandMoveImage(
         Arrays.asList(new MapillaryAbstractImage[] { this.img3, this.img1 }),
         0.2, 0.2);
-    this.record.addCommand(cmd1);
-    this.record.addCommand(cmd2);
+    this.record.addCommand(cmd12);
+    this.record.addCommand(cmd23);
 
     assertEquals(1, this.record.position);
@@ -64,19 +67,28 @@
     assertEquals(2, this.record.commandList.size());
 
-    this.record.addCommand(cmd3);
+    this.record.addCommand(cmd1);
 
     assertEquals(1, this.record.position);
-    assertEquals(2, this.record.commandList.size());
+
+    this.record.addCommand(cmd13);
+
+    assertEquals(2, this.record.position);
+    assertEquals(3, this.record.commandList.size());
 
     this.record.undo();
     this.record.redo();
 
-    assertEquals(1, this.record.position);
-    assertEquals(2, this.record.commandList.size());
+    assertEquals(2, this.record.position);
+    assertEquals(3, this.record.commandList.size());
 
     this.record.addCommand(cmd31);
 
-    assertEquals(1, this.record.position);
-    assertEquals(2, this.record.commandList.size());
+    assertEquals(2, this.record.position);
+    assertEquals(3, this.record.commandList.size());
+
+    this.record.addCommand(cmd1);
+
+    assertEquals(3, this.record.position);
+    assertEquals(4, this.record.commandList.size());
   }
 
Index: applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/PluginStateTest.java
===================================================================
--- applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/PluginStateTest.java	(revision 31482)
+++ applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/utils/PluginStateTest.java	(revision 31482)
@@ -0,0 +1,49 @@
+package org.openstreetmap.josm.plugins.mapillary.utils;
+
+import static org.junit.Assert.assertEquals;
+
+import org.junit.Test;
+
+/**
+ * Tests {@link PluginState} class.
+ *
+ * @author nokutu
+ * @see PluginState
+ */
+public class PluginStateTest {
+
+  /**
+   * Test the methods related to the download.
+   */
+  @Test
+  public void downloadTest() {
+    assertEquals(false, PluginState.isDownloading());
+    PluginState.startDownload();
+    assertEquals(true, PluginState.isDownloading());
+    PluginState.startDownload();
+    assertEquals(true, PluginState.isDownloading());
+    PluginState.finishDownload();
+    assertEquals(true, PluginState.isDownloading());
+    PluginState.finishDownload();
+    assertEquals(false, PluginState.isDownloading());
+  }
+
+  /**
+   * Tests the methods related to the upload.
+   */
+  @Test
+  public void uploadTest() {
+    assertEquals(false, PluginState.isUploading());
+    PluginState.imagesToUpload(2);
+    assertEquals(2, PluginState.imagesToUpload);
+    assertEquals(0, PluginState.imagesUploaded);
+    assertEquals(true, PluginState.isUploading());
+    PluginState.imageUploaded();
+    assertEquals(1, PluginState.imagesUploaded);
+    assertEquals(true, PluginState.isUploading());
+    PluginState.imageUploaded();
+    assertEquals(false, PluginState.isUploading());
+    assertEquals(0, PluginState.imagesToUpload);
+    assertEquals(0, PluginState.imagesUploaded);
+  }
+}
