- public void test() throws Exception {
- try {
- StmtTestUtils.parseYangSources("/bugs/bug4410");
- fail("SomeModifiersUnresolvedException should be thrown.");
- } catch (SomeModifiersUnresolvedException e) {
- Throwable rootCause = Throwables.getRootCause(e);
- assertTrue(rootCause instanceof InferenceException);
- final String message = rootCause.getMessage();
- assertTrue(message.startsWith("Type [(foo)"));
- assertTrue(message.contains("was not found"));
- }
+ public void test() {
+ final var cause = assertInferenceExceptionDir("/bugs/bug4410",
+ startsWith("Yang model processing phase EFFECTIVE_MODEL failed [at ")).getCause();
+ assertThat(cause, instanceOf(InferenceException.class));
+ assertThat(cause.getMessage(), allOf(startsWith("Type [(foo)"), containsString("was not found")));