Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TurnRestrictionTestTest.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TurnRestrictionTestTest.java	(revision 14966)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/TurnRestrictionTestTest.java	(revision 14966)
@@ -0,0 +1,35 @@
+// License: GPL. For details, see LICENSE file.
+package org.openstreetmap.josm.data.validation.tests;
+
+import org.junit.Rule;
+import org.junit.Test;
+import org.openstreetmap.josm.testutils.JOSMTestRules;
+
+import edu.umd.cs.findbugs.annotations.SuppressFBWarnings;
+
+/**
+ * JUnit Test of turn restriction validation test.
+ */
+public class TurnRestrictionTestTest {
+
+    private static final TurnrestrictionTest TURNRESTRICTION_TEST = new TurnrestrictionTest();
+    private static final RelationChecker RELATION_TEST = new RelationChecker();
+
+    /**
+     * Setup test.
+     */
+    @Rule
+    @SuppressFBWarnings(value = "URF_UNREAD_PUBLIC_OR_PROTECTED_FIELD")
+    public JOSMTestRules test = new JOSMTestRules().projection().mapStyles().presets().main();
+
+    /**
+     * Test all error cases manually created in restriction.osm.
+     * @throws Exception in case of error
+     */
+    @Test
+    public void testTurnrestrictionFile() throws Exception {
+        ValidatorTestUtils.testSampleFile("data_nodist/restriction.osm",
+                ds -> ds.getRelations(),
+                name -> name.startsWith("E"), TURNRESTRICTION_TEST, RELATION_TEST);
+    }
+}
Index: trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java
===================================================================
--- trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java	(revision 14961)
+++ trunk/test/unit/org/openstreetmap/josm/data/validation/tests/ValidatorTestUtils.java	(revision 14966)
@@ -38,14 +38,14 @@
             for (T t: provider.apply(OsmReader.parseDataSet(is, null))) {
                 String name = DefaultNameFormatter.getInstance().format(t);
+                List<TestError> errors = new ArrayList<>();
+                for (Test test : tests) {
+                    test.initialize();
+                    test.startTest(null);
+                    test.visit(Collections.singleton(t));
+                    test.endTest();
+                    errors.addAll(test.getErrors());
+                }
                 String codes = t.get("josm_error_codes");
                 if (codes != null) {
-                    List<TestError> errors = new ArrayList<>();
-                    for (Test test : tests) {
-                        test.initialize();
-                        test.startTest(null);
-                        test.visit(Collections.singleton(t));
-                        test.endTest();
-                        errors.addAll(test.getErrors());
-                    }
                     Set<Integer> expectedCodes = new TreeSet<>();
                     if (!"none".equals(codes)) {
@@ -65,4 +65,6 @@
                 } else if (t.hasKey("name") && namePredicate != null && namePredicate.test(t.getName())) {
                     fail(name + " lacks josm_error_codes tag");
+                } else if (t.hasKey("name") && name.startsWith("OK") && !errors.isEmpty()) {
+                    fail(name + "has unexpected error(s) ");
                 }
             }
