-// final DOMDataBroker dataBroker = Mockito.mock(DOMDataBroker.class);
-// doReturn(Optional.of(dataBroker)).when(mountPoint).getService(DOMDataBroker.class);
-// doReturn(this.transactionChainHandler.get()).when(dataBroker)
-// .createTransactionChain(RestConnectorProvider.TRANSACTION_CHAIN_LISTENER);
- final InstanceIdentifierContext<DataSchemaNode> iidContext =
- new InstanceIdentifierContext<>(this.iidBase, this.schemaNode, mountPoint, this.contextRef);
- final NormalizedNodeContext payload = new NormalizedNodeContext(iidContext, this.buildBaseCont);
-
- doReturn(immediateTrueFluentFuture()).when(this.readWrite)
- .exists(LogicalDatastoreType.CONFIGURATION, this.iidBase);
- doNothing().when(this.readWrite).put(LogicalDatastoreType.CONFIGURATION, this.iidBase, payload.getData());
- final Response response = this.dataService.putData(null, payload, this.uriInfo);
+ final InstanceIdentifierContext iidContext =
+ new InstanceIdentifierContext(iidBase, schemaNode, mountPoint, contextRef);
+ final NormalizedNodePayload payload = NormalizedNodePayload.of(iidContext, buildBaseCont);
+
+ doReturn(immediateTrueFluentFuture()).when(read)
+ .exists(LogicalDatastoreType.CONFIGURATION, iidBase);
+ doNothing().when(readWrite).put(LogicalDatastoreType.CONFIGURATION, iidBase, payload.getData());
+ final Response response = dataService.putData(null, payload, uriInfo);