Do not mask single exceptions
[yangtools.git] / parser / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / openconfigver / OpenconfigVersionTest.java
index 577649e4002e0fa896d3cf57b6086da002ab918b..639c36a1e13ba1d459d3a6d407b93784a4ead68e 100644 (file)
@@ -108,18 +108,18 @@ public class OpenconfigVersionTest {
     }
 
     @Test
-    public void basicImportErrTest1() throws Exception {
+    public void basicImportErrTest1() {
         ReactorException ex = assertThrows(ReactorException.class,
             () -> StmtTestUtils.parseYangSources("/openconfig-version/basic-import-invalid-1", SEMVER));
-        assertThat(ex.getCause().getCause().getMessage(),
+        assertThat(ex.getCause().getMessage(),
             startsWith("Unable to find module compatible with requested import [bar(0.1.2)]."));
     }
 
     @Test
-    public void basicImportErrTest2() throws Exception {
+    public void basicImportErrTest2() {
         ReactorException ex = assertThrows(ReactorException.class,
             () -> StmtTestUtils.parseYangSources("/openconfig-version/basic-import-invalid-2", SEMVER));
-        assertThat(ex.getCause().getCause().getMessage(),
+        assertThat(ex.getCause().getMessage(),
             startsWith("Unable to find module compatible with requested import [bar(0.1.2)]."));
     }