Do not mask single exceptions
[yangtools.git] / parser / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / Bug7480Test.java
index bea668a07d1c488ce580ed5dd66e8bb424cb401a..f2224c3c868348341e0d9923d3d1338a0a064f5f 100644 (file)
@@ -54,7 +54,7 @@ public class Bug7480Test {
         final var ex = assertThrows(SomeModifiersUnresolvedException.class,
             () -> parseYangSources("/bugs/bug7480/files-2", "/bugs/bug7480/lib-2"));
         final String message = ex.getSuppressed().length > 0
-            ? ex.getSuppressed()[0].getCause().getMessage() : ex.getCause().getCause().getMessage();
+            ? ex.getSuppressed()[0].getMessage() : ex.getCause().getMessage();
         assertThat(message, startsWith("Imported module [missing-lib] was not found."));
     }