- final List<InputStream> streams = new ArrayList<>();
- try {
- // we need prefix-shard-configuration and odl-datastore-test models
- // for DistributedShardedDOMDataTree tests
- streams.add(getInputStream(ODL_DATASTORE_TEST_YANG));
- streams.add(new FileInputStream("src/main/yang/prefix-shard-configuration.yang"));
- return YangParserTestUtils.parseYangStreams(streams);
- } catch (FileNotFoundException | ReactorException e) {
- throw new RuntimeException(e);
- }
+ // we need prefix-shard-configuration and odl-datastore-test models
+ // for DistributedShardedDOMDataTree tests
+ return YangParserTestUtils.parseYangResources(SchemaContextHelper.class, ODL_DATASTORE_TEST_YANG,
+ "/META-INF/yang/prefix-shard-configuration@2017-01-10.yang");