### Question:
SouthboundUtil { public static <D extends DataObject> Optional<D> readNode(ReadWriteTransaction transaction, InstanceIdentifier<D> connectionIid) { Optional<D> node; try { Node cachedNode = OvsdbOperGlobalListener.OPER_NODE_CACHE.get(connectionIid); if (cachedNode != null) { node = Optional.of((D)cachedNode); } else { node = transaction.read(LogicalDatastoreType.OPERATIONAL, connectionIid).get(); } } catch (InterruptedException | ExecutionException e) { LOG.warn("Read Operational/DS for Node failed! {}", connectionIid, e); throw new RuntimeException(e); } return node; } private  SouthboundUtil(); static Optional<OvsdbNodeAugmentation> getManagingNode(DataBroker db, OvsdbBridgeAttributes mn); static Optional<D> readNode(ReadWriteTransaction transaction,
        InstanceIdentifier<D> connectionIid); static Optional<D> readNode(ReadTransaction transaction,
                                                              InstanceIdentifier<D> connectionIid); static String getControllerTarget(Node ovsdbNode); static String connectionInfoToString(final ConnectionInfo connectionInfo); static void schemaMismatchLog(String column, String table, SchemaVersionMismatchException ex); static PortExternalIds createExternalIdsForPort(String key, String value); static InterfaceExternalIds createExternalIdsForInterface(String key, String value); static InterfaceExternalIds interfaceCreatedByOpenDaylight(); static PortExternalIds portCreatedByOpenDaylight(); @SuppressWarnings("checkstyle:IllegalCatch") static String getOvsdbNodeId(InstanceIdentifier<Node> nodeIid); static String getBridgeNameFromOvsdbNodeId(InstanceIdentifier<Node> nodeIid);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testReadNode() throws Exception { Optional<DataObject> node = Optional.of(mock(DataObject.class)); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); InstanceIdentifier<DataObject> connectionIid = mock(InstanceIdentifier.class); FluentFuture<Optional<DataObject>> value = mock(FluentFuture.class); when(transaction.read(LogicalDatastoreType.OPERATIONAL, connectionIid)).thenReturn(value); when(value.get()).thenReturn(node); assertEquals("Incorrect Optional object received", node, SouthboundUtil.readNode(transaction, connectionIid)); }