SfcOvsDataStoreAPI implements Callable { private Node readOvsdbNodeByRef(OvsdbNodeRef nodeRef) { Preconditions.checkNotNull(nodeRef, "Cannot READ OVS Node from OVSDB operational store, nodeRef is null."); InstanceIdentifier<Node> bridgeIID = (InstanceIdentifier<Node>) nodeRef.getValue(); return SfcDataStoreAPI.readTransactionAPI(bridgeIID, LogicalDatastoreType.OPERATIONAL); } SfcOvsDataStoreAPI(Method methodToCall, Object[] newMethodParameters); @Override Object call();  }
@Test public void testReadOvsdbNodeByRef() throws Exception { OvsdbNodeRef ovsdbNodeRef = new OvsdbNodeRef(nodeIID); methodToCall = SfcOvsDataStoreAPI.Method.READ_OVSDB_NODE_BY_REF; methodParams[0] = ovsdbNodeRef; PowerMockito.stub(PowerMockito.method(SfcDataStoreAPI.class, "readTransactionAPI")).toReturn(createNode()); sfcOvsDataStoreAPIObject = new SfcOvsDataStoreAPI(methodToCall, methodParams); testResult = sfcOvsDataStoreAPIObject.call(); assertNotNull("Must not be null", testResult); }