SfcOvsDataStoreAPI implements Callable { private OvsdbBridgeAugmentation readOvsdbBridge(InstanceIdentifier<OvsdbBridgeAugmentation> bridgeIID) { Preconditions.checkNotNull(bridgeIID, "Cannot READ OVS Bridge from OVS operational store, InstanceIdentifier<OvsdbBridgeAugmentation> is null."); return SfcDataStoreAPI.readTransactionAPI(bridgeIID, LogicalDatastoreType.OPERATIONAL); } SfcOvsDataStoreAPI(Method methodToCall, Object[] newMethodParameters); @Override Object call();  }
@Test public void testReadOvsdbBridge() throws Exception { methodToCall = SfcOvsDataStoreAPI.Method.READ_OVSDB_BRIDGE; methodParams[0] = createBridgeIID(); sfcOvsDataStoreAPIObject = new SfcOvsDataStoreAPI(methodToCall, methodParams); PowerMockito.stub(PowerMockito.method(SfcDataStoreAPI.class, "readTransactionAPI")) .toReturn(createOvsdbBridgeAugmentation()); testResult = sfcOvsDataStoreAPIObject.call(); assertNotNull("Must not be null", testResult); }