Update StmtTestUtils
[yangtools.git] / yang / yang-parser-impl / src / test / java / org / opendaylight / yangtools / yang / parser / stmt / rfc7950 / Bug6884Test.java
index 090788836a3cf25096160cf05213e1337464397e..99a78730dc10560ed56d8662933f977e9728b8e7 100644 (file)
@@ -11,8 +11,6 @@ import static org.junit.Assert.assertNotNull;
 import static org.junit.Assert.assertTrue;
 
 import com.google.common.collect.ImmutableList;
-import java.io.FileNotFoundException;
-import java.net.URISyntaxException;
 import org.junit.Test;
 import org.opendaylight.yangtools.yang.common.QName;
 import org.opendaylight.yangtools.yang.model.api.ContainerSchemaNode;
@@ -20,8 +18,6 @@ import org.opendaylight.yangtools.yang.model.api.SchemaContext;
 import org.opendaylight.yangtools.yang.model.api.SchemaNode;
 import org.opendaylight.yangtools.yang.model.api.SchemaPath;
 import org.opendaylight.yangtools.yang.model.util.SchemaContextUtil;
-import org.opendaylight.yangtools.yang.parser.spi.meta.ReactorException;
-import org.opendaylight.yangtools.yang.parser.spi.source.SourceException;
 import org.opendaylight.yangtools.yang.stmt.StmtTestUtils;
 
 public class Bug6884Test {
@@ -29,21 +25,23 @@ public class Bug6884Test {
     private static final String FOO_REV = "1970-01-01";
 
     @Test
-    public void testYang11() throws SourceException, FileNotFoundException, ReactorException, URISyntaxException {
+    public void testYang11() throws Exception {
         final SchemaContext schemaContext = StmtTestUtils.parseYangSources("/rfc7950/bug6884/yang1-1");
         assertNotNull(schemaContext);
 
-        assertTrue(findNode(schemaContext, ImmutableList.of(foo("sub-root"), foo("sub-foo-2-con"))) instanceof ContainerSchemaNode);
+        assertTrue(findNode(schemaContext, ImmutableList.of(foo("sub-root"), foo("sub-foo-2-con")))
+            instanceof ContainerSchemaNode);
     }
 
     @Test
-    public void testCircularIncludesYang10() throws SourceException, FileNotFoundException, ReactorException,
-            URISyntaxException {
+    public void testCircularIncludesYang10() throws Exception {
         final SchemaContext schemaContext = StmtTestUtils.parseYangSources("/rfc7950/bug6884/circular-includes");
 
         assertNotNull(schemaContext);
-        assertTrue(findNode(schemaContext, ImmutableList.of(foo("sub-root"), foo("sub-foo-2-con"))) instanceof ContainerSchemaNode);
-        assertTrue(findNode(schemaContext, ImmutableList.of(foo("sub-root-2"), foo("sub-foo-con"))) instanceof ContainerSchemaNode);
+        assertTrue(findNode(schemaContext, ImmutableList.of(foo("sub-root"), foo("sub-foo-2-con")))
+            instanceof ContainerSchemaNode);
+        assertTrue(findNode(schemaContext, ImmutableList.of(foo("sub-root-2"), foo("sub-foo-con")))
+            instanceof ContainerSchemaNode);
     }
 
     private static SchemaNode findNode(final SchemaContext context, final Iterable<QName> qNames) {