### Question:
OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { @VisibleForTesting void updateBridge(ReadWriteTransaction transaction, Bridge bridge, InstanceIdentifier<Node> connectionIId) { Node connectionNode = buildConnectionNode(bridge); transaction.merge(LogicalDatastoreType.OPERATIONAL, connectionIId, connectionNode); InstanceIdentifier<Node> bridgeIid = getInstanceIdentifier(bridge); Node bridgeNode = buildBridgeNode(bridge); transaction.merge(LogicalDatastoreType.OPERATIONAL, bridgeIid, bridgeNode); updatedBridges.add(bridgeIid); updatedBridgeNodes.put(getNodeId(bridge), bridgeNode); deleteEntries(transaction, protocolEntriesToRemove(bridgeIid, bridge)); deleteEntries(transaction, externalIdsToRemove(bridgeIid,bridge)); deleteEntries(transaction, bridgeOtherConfigsToRemove(bridgeIid,bridge)); } OvsdbBridgeUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema,
                                    Map<NodeId, Node> updatedBridgeNodes); @Override void execute(ReadWriteTransaction transaction); @Override void onSuccess(); @Override void onFailure(Throwable throwable);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testUpdateBridge() throws Exception { MemberModifier .suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "buildConnectionNode", Bridge.class)); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); doNothing().when(transaction).merge(any(LogicalDatastoreType.class), any(InstanceIdentifier.class), any(Node.class)); MemberModifier .suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "getInstanceIdentifier", Bridge.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "buildBridgeNode", Bridge.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "deleteEntries", ReadWriteTransaction.class, List.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "protocolEntriesToRemove", InstanceIdentifier.class, Bridge.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "externalIdsToRemove", InstanceIdentifier.class, Bridge.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "bridgeOtherConfigsToRemove", InstanceIdentifier.class, Bridge.class)); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "getNodeId", Bridge.class)); Bridge bridge = mock(Bridge.class); InstanceIdentifier<Node> connectionIId = mock(InstanceIdentifier.class); Whitebox.invokeMethod(ovsdbBridgeUpdateCommand, "updateBridge", transaction, bridge, connectionIId); verify(ovsdbBridgeUpdateCommand, times(3)).deleteEntries(any(ReadWriteTransaction.class), eq(null)); }