Index: /trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java	(revision 9805)
+++ /trunk/test/unit/org/openstreetmap/josm/data/coor/LatLonTest.java	(revision 9806)
@@ -10,4 +10,6 @@
  */
 public class LatLonTest {
+
+    private static final double EPSILON = 1e-6;
 
     public static final double[] SAMPLE_VALUES = new double[]{
@@ -124,3 +126,17 @@
         }
     }
+
+    /**
+     * Test of {@link LatLon#bearing}
+     */
+    @Test
+    public void testBearing() {
+        LatLon c = new LatLon(47.000000, 19.000000);
+        LatLon e = new LatLon(47.000000, 19.000001);
+        LatLon n = new LatLon(47.000001, 19.000000);
+        assertEquals(  0, Math.toDegrees(c.bearing(n)), EPSILON);
+        assertEquals( 90, Math.toDegrees(c.bearing(e)), EPSILON);
+        assertEquals(180, Math.toDegrees(n.bearing(c)), EPSILON);
+        assertEquals(270, Math.toDegrees(e.bearing(c)), EPSILON);
+    }
 }
