- public void testChildNameCollisionNormal() throws Exception {
- final ReactorException ex = assertThrows(ReactorException.class,
- () -> StmtTestUtils.parseYangSource("/bugs/name-collision-within-case/baz.yang"));
- final Throwable cause = ex.getCause();
- assertThat(cause, instanceOf(SourceException.class));
- assertThat(cause.getMessage(), startsWith(
- "Error in module 'baz': cannot add '(baz?revision=2018-02-28)bar'. Node name collision: "));
+ public void testChildNameCollisionNormal() {
+ assertSourceException(startsWith("Error in module 'baz': cannot add '(baz?revision=2018-02-28)bar'."
+ + " Node name collision: "), "/bugs/name-collision-within-case/baz.yang");