- final ReactorException ex = assertThrows(ReactorException.class,
- () -> StmtTestUtils.parseYangSource("/bugs/YT1189/foo.yang"));
- final Throwable cause = ex.getCause();
- assertThat(cause, instanceOf(SourceException.class));
- assertThat(cause.getMessage(),
- startsWith("Descendant schema node identifier is not allowed when used outside of a uses statement [at "));
+ assertSourceException(startsWith("Descendant schema node identifier is not allowed when used outside"
+ + " of a uses statement [at "), "/bugs/YT1189/foo.yang");