Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java	(revision 31453)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/downloads/MapillaryDownloader.java	(revision 31454)
@@ -157,5 +157,4 @@
   private static boolean isAreaTooBig() {
     double area = 0;
-    System.out.println(Main.map.mapView.getLayersOfType(OsmDataLayer.class));
     for (Bounds bounds : Main.map.mapView.getEditLayer().data
         .getDataSourceBounds()) {
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java	(revision 31453)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/HyperlinkLabel.java	(revision 31454)
@@ -5,4 +5,7 @@
 import java.awt.AWTEvent;
 import java.awt.Cursor;
+import java.awt.Toolkit;
+import java.awt.datatransfer.Clipboard;
+import java.awt.datatransfer.StringSelection;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -14,7 +17,10 @@
 
 import javax.swing.JLabel;
+import javax.swing.JMenuItem;
+import javax.swing.JPopupMenu;
 import javax.swing.SwingConstants;
 
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.plugins.mapillary.MapillaryImage;
 
 import java.awt.Desktop;
@@ -84,9 +90,47 @@
    */
   @Override
-  protected void processMouseEvent(MouseEvent evt) {
-    super.processMouseEvent(evt);
-    if (evt.getID() == MouseEvent.MOUSE_CLICKED)
-      fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
-          getNormalText()));
+  protected void processMouseEvent(MouseEvent e) {
+    super.processMouseEvent(e);
+    if (e.getID() == MouseEvent.MOUSE_CLICKED) {
+      if (e.getButton() == MouseEvent.BUTTON1)
+        fireActionPerformed(new ActionEvent(this, ActionEvent.ACTION_PERFORMED,
+            getNormalText()));
+      if (e.getButton() == MouseEvent.BUTTON3) {
+        LinkPopUp menu = new LinkPopUp();
+        menu.show(e.getComponent(), e.getX(), e.getY());
+      }
+    }
+  }
+
+  /**
+   * PopUp shown when right click on the label.
+   *
+   * @author nokutu
+   *
+   */
+  private class LinkPopUp extends JPopupMenu {
+
+    private static final long serialVersionUID = 1384054752970921552L;
+
+    JMenuItem copy;
+
+    public LinkPopUp() {
+      this.copy = new JMenuItem("Copy key");
+      this.copy.addActionListener(new copyAction());
+      add(this.copy);
+    }
+
+    private class copyAction implements ActionListener {
+
+      @Override
+      public void actionPerformed(ActionEvent arg0) {
+        StringSelection stringSelection = new StringSelection(
+            ((MapillaryImage) MapillaryMainDialog.getInstance().getImage())
+                .getKey());
+        Clipboard clpbrd = Toolkit.getDefaultToolkit().getSystemClipboard();
+        clpbrd.setContents(stringSelection, null);
+      }
+
+    }
   }
 
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java	(revision 31453)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/gui/MapillaryMainDialog.java	(revision 31454)
@@ -510,5 +510,4 @@
       });
     } else if (data != null && result == LoadResult.SUCCESS) {
-      System.out.println(attributes.getMetadata());
       try {
         BufferedImage img = ImageIO.read(new ByteArrayInputStream(data
Index: /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java	(revision 31453)
+++ /applications/editors/josm/plugins/mapillary/src/org/openstreetmap/josm/plugins/mapillary/oauth/OAuthUtils.java	(revision 31454)
@@ -167,5 +167,4 @@
     HttpResponse response = httpClient.execute(httpPost);
     if (response.getStatusLine().toString().contains("204")) {
-      System.out.println("Succesfully uploaded image");
       PluginState.imageUploaded();
     }
@@ -234,5 +233,16 @@
   }
 
-  private static File updateFile(MapillaryImportedImage image)
+  /**
+   * Returns a file containing the picture and an updated version of the EXIF
+   * tags.
+   *
+   * @param image
+   * @return A File object containing the picture and an updated version of the
+   *         EXIF tags.
+   * @throws ImageReadException
+   * @throws IOException
+   * @throws ImageWriteException
+   */
+  public static File updateFile(MapillaryImportedImage image)
       throws ImageReadException, IOException, ImageWriteException {
     TiffOutputSet outputSet = null;
Index: /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillarySequenceDownloadThreadTest.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillarySequenceDownloadThreadTest.java	(revision 31453)
+++ /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/MapillarySequenceDownloadThreadTest.java	(revision 31454)
@@ -10,5 +10,4 @@
 import java.util.concurrent.Executors;
 
-import org.junit.Before;
 import org.junit.Test;
 import org.openstreetmap.josm.data.Bounds;
@@ -16,5 +15,4 @@
 import org.openstreetmap.josm.plugins.mapillary.downloads.MapillaryDownloader;
 import org.openstreetmap.josm.plugins.mapillary.downloads.MapillarySequenceDownloadThread;
-import org.openstreetmap.josm.plugins.mapillary.util.TestUtil;
 
 /**
Index: /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/UploadTest.java
===================================================================
--- /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/UploadTest.java	(revision 31454)
+++ /applications/editors/josm/plugins/mapillary/test/unit/org/openstreetmap/josm/plugins/mapillary/UploadTest.java	(revision 31454)
@@ -0,0 +1,70 @@
+package org.openstreetmap.josm.plugins.mapillary;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+
+import org.apache.commons.imaging.ImageReadException;
+import org.apache.commons.imaging.ImageWriteException;
+import org.apache.commons.imaging.Imaging;
+import org.apache.commons.imaging.common.ImageMetadata;
+import org.apache.commons.imaging.common.RationalNumber;
+import org.apache.commons.imaging.formats.jpeg.JpegImageMetadata;
+import org.apache.commons.imaging.formats.tiff.constants.ExifTagConstants;
+import org.apache.commons.imaging.formats.tiff.constants.GpsTagConstants;
+import org.junit.Test;
+import org.openstreetmap.josm.data.coor.LatLon;
+import org.openstreetmap.josm.plugins.mapillary.actions.MapillaryImportAction;
+import org.openstreetmap.josm.plugins.mapillary.oauth.OAuthUtils;
+
+public class UploadTest extends AbstractTest {
+
+  /**
+   * Tests the updateFile method from {@link MapillaryImportAction} class.
+   */
+  @Test
+  public void updateFileTest() {
+    File image = new File("images/icon16.png");
+    MapillaryImportedImage img = new MapillaryImportAction().readNoTags(image,
+        new LatLon(0, 0));
+    File updatedFile = null;
+    try {
+      updatedFile = OAuthUtils.updateFile(img);
+      ImageMetadata metadata = Imaging.getMetadata(updatedFile);
+      final JpegImageMetadata jpegMetadata = (JpegImageMetadata) metadata;
+      assert (jpegMetadata
+          .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF) != null);
+      assert (jpegMetadata
+          .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LATITUDE) != null);
+      assert (jpegMetadata
+          .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF) != null);
+      assert (jpegMetadata
+          .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_LONGITUDE) != null);
+      assert (jpegMetadata
+          .findEXIFValueWithExactMatch(GpsTagConstants.GPS_TAG_GPS_IMG_DIRECTION) != null);
+      assert (jpegMetadata
+          .findEXIFValueWithExactMatch(ExifTagConstants.EXIF_TAG_DATE_TIME_ORIGINAL) != null);
+      assertEquals(0, MapillaryImportAction.degMinSecToDouble(
+          (RationalNumber[]) jpegMetadata.findEXIFValueWithExactMatch(
+              GpsTagConstants.GPS_TAG_GPS_LATITUDE).getValue(),
+          jpegMetadata
+              .findEXIFValueWithExactMatch(
+                  GpsTagConstants.GPS_TAG_GPS_LATITUDE_REF).getValue()
+              .toString()), 0.01);
+      assertEquals(0, MapillaryImportAction.degMinSecToDouble(
+          (RationalNumber[]) jpegMetadata.findEXIFValueWithExactMatch(
+              GpsTagConstants.GPS_TAG_GPS_LONGITUDE).getValue(),
+          jpegMetadata
+              .findEXIFValueWithExactMatch(
+                  GpsTagConstants.GPS_TAG_GPS_LONGITUDE_REF).getValue()
+              .toString()), 0.01);
+
+    } catch (ImageReadException | ImageWriteException | IOException e) {
+      fail();
+    } finally {
+      updatedFile.delete();
+    }
+  }
+}
