Index: trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java	(revision 14796)
+++ trunk/test/unit/org/openstreetmap/josm/data/gpx/GpxImageCorrelationTest.java	(revision 14797)
@@ -4,4 +4,5 @@
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertFalse;
+import static org.junit.Assert.assertNull;
 import static org.junit.Assert.assertTrue;
 
@@ -14,4 +15,5 @@
 import org.openstreetmap.josm.TestUtils;
 import org.openstreetmap.josm.data.coor.CachedLatLon;
+import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.io.GpxReaderTest;
 import org.openstreetmap.josm.spi.preferences.Config;
@@ -267,3 +269,19 @@
         }
     }
+
+    /**
+     * Unit test of {@link GpxImageCorrelation#getElevation}
+     */
+    @Test
+    public void testGetElevation() {
+        assertNull(GpxImageCorrelation.getElevation(null));
+        WayPoint wp = new WayPoint(LatLon.ZERO);
+        assertNull(GpxImageCorrelation.getElevation(wp));
+        wp.put(GpxConstants.PT_ELE, "");
+        assertNull(GpxImageCorrelation.getElevation(wp));
+        wp.put(GpxConstants.PT_ELE, "not a number");
+        assertNull(GpxImageCorrelation.getElevation(wp));
+        wp.put(GpxConstants.PT_ELE, "150.0");
+        assertEquals(Double.valueOf(150.0d), GpxImageCorrelation.getElevation(wp));
+    }
 }
