- List<InputStream> inputStreams = new ArrayList<>();
- inputStreams.add(getDatastoreTestInputStream());
- inputStreams.add(getDatastoreTestNotificationInputStream());
-
- return resolveSchemaContext(inputStreams);
- }
-
- private static SchemaContext resolveSchemaContext(List<InputStream> streams) {
- final CrossSourceStatementReactor.BuildAction reactor = YangInferencePipeline.RFC6020_REACTOR.newBuild();
- final SchemaContext schemaContext;
-
- try {
- schemaContext = reactor.buildEffective(streams);
- } catch (ReactorException e) {
- throw new RuntimeException("Unable to build schema context from " + streams, e);
- }
- return schemaContext;
+ return YangParserTestUtils.parseYangResources(TestModel.class, DATASTORE_TEST_YANG,
+ DATASTORE_TEST_NOTIFICATION_YANG);