### Question:
OpenVSwitchUpdateCommand extends AbstractTransactionCommand { @VisibleForTesting void removeExternalIds(ReadWriteTransaction transaction, Map<String, String> oldExternalIds, OpenVSwitch ovs) { InstanceIdentifier<OvsdbNodeAugmentation> nodeAugmentataionIid = InstanceIdentifier .create(NetworkTopology.class) .child(Topology.class, new TopologyKey(SouthboundConstants.OVSDB_TOPOLOGY_ID)) .child(Node.class, new NodeKey(getNodeId(ovs))) .augmentation(OvsdbNodeAugmentation.class); Set<String> externalIdKeys = oldExternalIds.keySet(); for (String externalIdKey : externalIdKeys) { KeyedInstanceIdentifier<OpenvswitchExternalIds, OpenvswitchExternalIdsKey> externalIid = nodeAugmentataionIid .child(OpenvswitchExternalIds.class, new OpenvswitchExternalIdsKey(externalIdKey)); transaction.delete(LogicalDatastoreType.OPERATIONAL, externalIid); } } OpenVSwitchUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@Test public void testRemoveExternalIds() throws Exception { ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); doNothing().when(transaction).delete(any(LogicalDatastoreType.class), any(KeyedInstanceIdentifier.class)); OpenVSwitch ovs = mock(OpenVSwitch.class); doReturn(mock(NodeId.class)).when(openVSwitchUpdateCommand).getNodeId(any()); Whitebox.invokeMethod(openVSwitchUpdateCommand, "removeExternalIds", transaction, ImmutableMap.of("OpenvswitchExternalIdKey", "OpenvswitchExternalIdValue"), ovs); verify(transaction).delete(any(LogicalDatastoreType.class), any(KeyedInstanceIdentifier.class)); }