Remove ImportResolutionMode.SEMVER_LATEST
[yangtools.git] / parser / yang-parser-rfc7950 / src / test / java / org / opendaylight / yangtools / yang / stmt / openconfigver / OpenconfigVersionTest.java
index 577649e4002e0fa896d3cf57b6086da002ab918b..11f83b9fcf3a109ff43a1e971208c8f6dd31d0f9 100644 (file)
@@ -29,6 +29,7 @@ import org.opendaylight.yangtools.yang.parser.api.YangParserConfiguration;
 import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
 import org.opendaylight.yangtools.yang.stmt.StmtTestUtils;
 
+@Deprecated(since = "8.0.4", forRemoval = true)
 public class OpenconfigVersionTest {
     private static final YangParserConfiguration SEMVER = YangParserConfiguration.builder()
         .importResolutionMode(ImportResolutionMode.OPENCONFIG_SEMVER)
@@ -108,18 +109,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)]."));
     }