+ final IllegalStateException ise = assertThrows(IllegalStateException.class,
+ () -> YangParserTestUtils.parseYangResourceDirectory("/leafref-context-test/incorrect-modules"));
+ final Throwable ype = ise.getCause();
+ assertThat(ype, instanceOf(YangParserException.class));
+ final Throwable reactor = ype.getCause();
+ assertThat(reactor, instanceOf(ReactorException.class));
+ final Throwable source = reactor.getCause();
+ assertThat(source, instanceOf(SourceException.class));
+ assertThat(source.getMessage(), startsWith("token recognition error at: './' at 1:2"));