### Question:
MdsalUtilsAsync { public <D extends DataObject> FluentFuture<Optional<D>> read( final LogicalDatastoreType store, final InstanceIdentifier<D> path) { final ReadTransaction transaction = databroker.newReadOnlyTransaction(); final FluentFuture<Optional<D>> future = transaction.read(store, path); final FutureCallback<Optional<D>> closeTransactionCallback = new FutureCallback<Optional<D>>() { @Override public void onSuccess(final Optional<D> result) { transaction.close(); } @Override public void onFailure(final Throwable ex) { transaction.close(); } }; future.addCallback(closeTransactionCallback, MoreExecutors.directExecutor()); return future; } MdsalUtilsAsync(final DataBroker dataBroker); FluentFuture<? extends CommitInfo> delete(
                                    final LogicalDatastoreType store,
                                    final InstanceIdentifier<D> path); void delete(
                                    final LogicalDatastoreType store,
                                    final InstanceIdentifier<D> path,
                                    final String operationDesc); FluentFuture<? extends CommitInfo> put(
                                        final LogicalDatastoreType logicalDatastoreType,
                                        final InstanceIdentifier<D> path,
                                        final D data); void put(
                                        final LogicalDatastoreType logicalDatastoreType,
                                        final InstanceIdentifier<D> path,
                                        final D data,
                                        final String operationDesc); FluentFuture<? extends CommitInfo> merge(
                                        final LogicalDatastoreType logicalDatastoreType,
                                        final InstanceIdentifier<D> path,
                                        final D data,
                                        final boolean withParent); void merge(
                                        final LogicalDatastoreType logicalDatastoreType,
                                        final InstanceIdentifier<D> path,
                                        final D data,
                                        final String operationDesc,
                                        final boolean withParent); FluentFuture<Optional<D>> read(
                                        final LogicalDatastoreType store,
                                        final InstanceIdentifier<D> path);  }### Answer:
@Test public void testRead() { final FluentFuture<? extends CommitInfo> fut = mdsalUtilsAsync.put(LogicalDatastoreType.CONFIGURATION, TEST_IID, DATA); fut.addCallback(new FutureCallback<CommitInfo>() { @Override public void onSuccess(final CommitInfo result) { final FluentFuture<Optional<Node>> future = mdsalUtilsAsync.read(LogicalDatastoreType.CONFIGURATION, TEST_IID); Optional<Node> optNode; try { optNode = future.get(); if (optNode.isPresent()) { assertEquals(DATA, optNode.get()); } else { fail("Couldn't read node"); } } catch (InterruptedException | ExecutionException e) { fail(e.getMessage()); } } @Override public void onFailure(final Throwable ex) { fail(ex.getMessage()); } }, MoreExecutors.directExecutor()); }