Bug 4540: Yang parser exceptions should follow consistent path
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / stmt / test / Bug4933Test.java
index c9b71a07cbce388755116da0370977b9da4a6b07..14ba17be33d0909ad988dfaa758ad69e665fe9d6 100644 (file)
@@ -9,6 +9,7 @@ package org.opendaylight.yangtools.yang.stmt.test;
 
 import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertTrue;
 import static org.junit.Assert.fail;
 
 import java.io.FileNotFoundException;
@@ -38,7 +39,7 @@ public class Bug4933Test {
             StmtTestUtils.parseYangSources("/bugs/bug4933/incorrect");
             fail("NullPointerException should be thrown.");
         } catch (NullPointerException e) {
-            assertEquals("String 'not_supported' is not valid deviate argument", e.getMessage());
+            assertTrue(e.getMessage().startsWith("String 'not_supported' is not valid deviate argument. Statement source at"));
         }
     }
 }