- final CheckedFuture<Optional<FlowCapableNode>, ReadFailedException> flowNodeFuture = Futures.immediateCheckedFuture(flowNodeOpt);
- when(readTx.read(LogicalDatastoreType.OPERATIONAL, nodePath)).thenReturn(flowNodeFuture);
- final KeyedInstanceIdentifier<Table, TableKey> tablePath = deviceInfo.getNodeInstanceIdentifier()
- .augmentation(FlowCapableNode.class).child(Table.class, new TableKey(tableId));
-
- StatisticsGatheringUtils.deleteAllKnownFlows(deviceInfo,
- deviceContext.getDeviceFlowRegistry(), txFacade);
-
- verify(txFacade).writeToTransaction(
- LogicalDatastoreType.OPERATIONAL,
- tablePath,
- tableDataBld.setFlow(Collections.<Flow>emptyList()).build());
+ doReturn(FluentFutures.immediateFluentFuture(flowNodeOpt)).when(readTx)
+ .read(LogicalDatastoreType.OPERATIONAL, nodePath);
+ StatisticsGatheringUtils.deleteAllKnownFlows(deviceContext, deviceInfo.getNodeInstanceIdentifier()
+ .augmentation(FlowCapableNode.class), deviceFlowRegistry);
+
+ verify(deviceContext).isTransactionsEnabled();
+ verify(deviceContext).getReadTransaction();
+ verify(deviceContext).writeToTransaction(eq(LogicalDatastoreType.OPERATIONAL), any(), any());