- SomeModifiersUnresolvedException ex = assertThrows(SomeModifiersUnresolvedException.class,
- () -> StmtTestUtils.parseYangSource("/rfc7950/bug6868/invalid10.yang"));
- assertThat(ex.getCause().getMessage(), startsWith("Invalid identifier '(not foo) or (bar and baz)' [at "));
+ assertSourceException(startsWith("Invalid identifier '(not foo) or (bar and baz)' [at "),
+ "/rfc7950/bug6868/invalid10.yang");