public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
this.refSchemaCtx = new SchemaContextRef(
- YangParserTestUtils.parseYangSources(TestRestconfUtils.loadFiles(PATH_FOR_NEW_SCHEMA_CONTEXT)));
+ YangParserTestUtils.parseYangFiles(TestRestconfUtils.loadFiles(PATH_FOR_NEW_SCHEMA_CONTEXT)));
}
@Test
private NormalizedNodeContext prepareDomPayload(final String rpcName, final String inputOutput,
final String toasterValue, final String inputOutputName) {
final SchemaContext schema = this.refSchemaCtx.get();
- final Module rpcModule = schema.findModuleByName("sal-remote", null);
- assertNotNull(rpcModule);
+ final Module rpcModule = schema.findModules("sal-remote").iterator().next();
final QName rpcQName = QName.create(rpcModule.getQNameModule(), rpcName);
final QName rpcInputQName = QName.create(rpcModule.getQNameModule(), inputOutput);
final Set<RpcDefinition> setRpcs = rpcModule.getRpcs();
} else {
o = toasterValue;
}
- final LeafNode<Object> lfNode = (Builders.leafBuilder((LeafSchemaNode) lfSchemaNode)
- .withValue(o)).build();
+ final LeafNode<Object> lfNode = Builders.leafBuilder((LeafSchemaNode) lfSchemaNode)
+ .withValue(o).build();
container.withChild(lfNode);
return new NormalizedNodeContext(new InstanceIdentifierContext<>(null, rpcInputSchemaNode, null, schema),