Fixup SchemaNodeIdentifier design
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / AugmentArgumentParsingTest.java
index e2b3600f32e5f1db1627a4eebcd08cd90ed73bae..747a3f6c807bdc7a3f7905f3eea545494d293118 100644 (file)
@@ -10,7 +10,6 @@ package org.opendaylight.yangtools.yang.stmt;
 import static org.hamcrest.CoreMatchers.instanceOf;
 import static org.hamcrest.CoreMatchers.startsWith;
 import static org.hamcrest.MatcherAssert.assertThat;
-import static org.junit.Assert.assertEquals;
 import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertThrows;
 import static org.opendaylight.yangtools.yang.stmt.StmtTestUtils.sourceForResource;
@@ -75,10 +74,8 @@ public class AugmentArgumentParsingTest {
     public void invalidAugEmptyTest() throws ReactorException {
         final ReactorException ex = assertReactorThrows(INVALID_EMPTY);
         final Throwable cause = ex.getCause();
-        assertThat(cause, instanceOf(IllegalArgumentException.class));
-        assertEquals(
-            "Namespace class org.opendaylight.yangtools.yang.parser.rfc7950.namespace.ChildSchemaNodeNamespace keys may"
-            + " not be empty", cause.getMessage());
+        assertThat(cause, instanceOf(SourceException.class));
+        assertThat(cause.getMessage(), startsWith("Schema node identifier must not be empty"));
     }
 
     @Test