Index: /trunk/test/data/duplicate-ways.osm
===================================================================
--- /trunk/test/data/duplicate-ways.osm	(revision 17222)
+++ /trunk/test/data/duplicate-ways.osm	(revision 17222)
@@ -0,0 +1,39 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version='0.6' upload='never' generator='JOSM'>
+  <node id='-106252' action='modify' visible='true' lat='52.91712394763' lon='8.5666095365' />
+  <node id='-106253' action='modify' visible='true' lat='52.91800428714' lon='8.5685258145' />
+  <node id='-106256' action='modify' visible='true' lat='52.91685832864' lon='8.56603863765' />
+  <node id='-106261' action='modify' visible='true' lat='52.91837800291' lon='8.56989891347' />
+  <way id='-107282' action='modify' visible='true'>
+    <nd ref='-106252' />
+    <nd ref='-106253' />
+    <tag k='highway' v='residential' />
+  </way>
+  <way id='-107287' action='modify' visible='true'>
+    <nd ref='-106252' />
+    <nd ref='-106253' />
+    <tag k='highway' v='residential' />
+  </way>
+  <way id='-107315' action='modify' visible='true'>
+    <nd ref='-106256' />
+    <nd ref='-106252' />
+    <tag k='highway' v='residential' />
+  </way>
+  <way id='-107316' action='modify' visible='true'>
+    <nd ref='-106261' />
+    <nd ref='-106253' />
+    <tag k='highway' v='residential' />
+  </way>
+  <way id='-107320' action='modify' visible='true'>
+    <nd ref='-106261' />
+    <nd ref='-106253' />
+    <tag k='highway' v='residential' />
+  </way>
+  <relation id='-99758' action='modify' visible='true'>
+    <member type='way' ref='-107315' role='' />
+    <member type='way' ref='-107287' role='' />
+    <member type='way' ref='-107320' role='' />
+    <tag k='route' v='road' />
+    <tag k='type' v='route' />
+  </relation>
+</osm>
Index: /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateWayTest.java
===================================================================
--- /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateWayTest.java	(revision 17221)
+++ /trunk/test/unit/org/openstreetmap/josm/data/validation/tests/DuplicateWayTest.java	(revision 17222)
@@ -3,8 +3,14 @@
 
 import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
+
+import java.nio.file.Files;
+import java.nio.file.Paths;
 
 import org.junit.Rule;
 import org.junit.Test;
 import org.openstreetmap.josm.TestUtils;
+import org.openstreetmap.josm.command.Command;
 import org.openstreetmap.josm.data.coor.LatLon;
 import org.openstreetmap.josm.data.osm.DataSet;
@@ -12,4 +18,5 @@
 import org.openstreetmap.josm.data.validation.TestError;
 import org.openstreetmap.josm.gui.progress.NullProgressMonitor;
+import org.openstreetmap.josm.io.OsmReader;
 import org.openstreetmap.josm.testutils.JOSMTestRules;
 
@@ -88,3 +95,32 @@
         doTest(DuplicateWay.SAME_WAY, "highway=motorway", "highway=trunk", false);
     }
+
+    /**
+     * Non-regression test for <a href="https://josm.openstreetmap.de/ticket/14891">Bug #14891</a>.
+     * @throws Exception if an error occurs
+     */
+    @Test
+    public void testFixError() throws Exception {
+        DataSet ds = OsmReader.parseDataSet(Files.newInputStream(Paths.get(TestUtils.getTestDataRoot(), "duplicate-ways.osm")), null);
+        TEST.startTest(NullProgressMonitor.INSTANCE);
+        TEST.visit(ds.allPrimitives());
+        TEST.endTest();
+
+        assertEquals(2, TEST.getErrors().size());
+        for (TestError error: TEST.getErrors()) {
+            error = TEST.getErrors().iterator().next();
+            assertTrue(error.isFixable());
+            Command fix = error.getFix();
+            assertNotNull(fix);
+        }
+        for (TestError error: TEST.getErrors()) {
+            error.getFix().executeCommand();
+        }
+        TEST.startTest(NullProgressMonitor.INSTANCE);
+        TEST.visit(ds.allPrimitives());
+        TEST.endTest();
+        assertTrue(TEST.getErrors().isEmpty());
+
+    }
+
 }
