+
+ private static InputStream getInputStream() {
+ return XSQLTest.class.getResourceAsStream(DATASTORE_TEST_YANG);
+ }
+
+ public static SchemaContext createTestContext() {
+ final CrossSourceStatementReactor.BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR.newBuild();
+ final SchemaContext schemaContext;
+ final List<InputStream> streams = Collections.singletonList(getInputStream());
+
+ try {
+ schemaContext = reactor.buildEffective(streams);
+ } catch (ReactorException e) {
+ throw new RuntimeException("Unable to build schema context from " + streams, e);
+ }
+ return schemaContext;
+ }