Index: /trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java
===================================================================
--- /trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 10346)
+++ /trunk/src/org/openstreetmap/josm/actions/AlignInLineAction.java	(revision 10347)
@@ -56,7 +56,7 @@
 
     /**
-     * InvalidSelection exception has to be raised when action can't be perform
-     */
-    private static class InvalidSelection extends Exception {
+     * InvalidSelection exception has to be raised when action can't be performed
+     */
+    static class InvalidSelection extends Exception {
 
         /**
@@ -69,5 +69,5 @@
         /**
          * Create an InvalidSelection exception with specific message
-         * @param msg Message that will be display to the user
+         * @param msg Message that will be displayed to the user
          */
         InvalidSelection(String msg) {
@@ -343,5 +343,5 @@
      * Class that represent a line
      */
-    private static class Line {
+    static class Line {
 
         /**
Index: /trunk/test/unit/org/openstreetmap/josm/actions/AlignInLineActionTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/actions/AlignInLineActionTest.java	(revision 10346)
+++ /trunk/test/unit/org/openstreetmap/josm/actions/AlignInLineActionTest.java	(revision 10347)
@@ -3,4 +3,5 @@
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
 
 import org.junit.BeforeClass;
@@ -8,4 +9,6 @@
 import org.openstreetmap.josm.JOSMFixture;
 import org.openstreetmap.josm.Main;
+import org.openstreetmap.josm.actions.AlignInLineAction.InvalidSelection;
+import org.openstreetmap.josm.actions.AlignInLineAction.Line;
 import org.openstreetmap.josm.data.coor.EastNorth;
 import org.openstreetmap.josm.data.coor.LatLon;
@@ -189,3 +192,37 @@
         assertEquals("Wrong y coordinate.", y, coordinate.getY(), LatLon.MAX_SERVER_PRECISION);
     }
+
+    /**
+     * Test that a {@link Line} can be constructed with nodes of different coordinates.
+     * @throws InvalidSelection never
+     */
+    @Test
+    public void testLineDifferentCoordinates() throws InvalidSelection {
+        assertNotNull(new Line(new Node(new EastNorth(0, 1)),
+                               new Node(new EastNorth(0, 2))));
+        assertNotNull(new Line(new Node(new EastNorth(0, 1)),
+                               new Node(new EastNorth(1, 1))));
+        assertNotNull(new Line(new Node(new EastNorth(0, 1)),
+                               new Node(new EastNorth(0+1e-150, 1+1e-150))));
+    }
+
+    /**
+     * Test that a {@link Line} cannot be constructed with nodes of same coordinates.
+     * @throws InvalidSelection always
+     */
+    @Test(expected = InvalidSelection.class)
+    public void testLineSameCoordinates1() throws InvalidSelection {
+        new Line(new Node(new EastNorth(0, 1)),
+                 new Node(new EastNorth(0, 1)));
+    }
+
+    /**
+     * Test that a {@link Line} cannot be constructed with nodes of same coordinates.
+     * @throws InvalidSelection always
+     */
+    @Test(expected = InvalidSelection.class)
+    public void testLineSameCoordinates2() throws InvalidSelection {
+        new Line(new Node(new EastNorth(0, 1)),
+                 new Node(new EastNorth(0+1e-175, 1+1e-175)));
+    }
 }
