### Question:
OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { private static void setExternalIds(OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder, Bridge bridge) { Map<String, String> externalIds = bridge.getExternalIdsColumn() .getData(); if (externalIds != null && !externalIds.isEmpty()) { List<BridgeExternalIds> externalIdsList = new ArrayList<>(); for (Entry<String, String> entry : externalIds.entrySet()) { String externalIdKey = entry.getKey(); String externalIdValue = entry.getValue(); if (externalIdKey != null && externalIdValue != null) { externalIdsList.add(new BridgeExternalIdsBuilder() .setBridgeExternalIdKey(externalIdKey) .setBridgeExternalIdValue(externalIdValue) .build()); } } ovsdbBridgeAugmentationBuilder.setBridgeExternalIds(externalIdsList); } } 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 testSetExternalIds() throws Exception { Bridge bridge = mock(Bridge.class); Column<GenericTableSchema, Map<String, String>> column = mock(Column.class); when(bridge.getExternalIdsColumn()).thenReturn(column); Map<String, String> map = new HashMap<>(); map.put("key", "value"); when(column.getData()).thenReturn(map); BridgeExternalIdsBuilder bridgeExternalIdsBuilder = mock(BridgeExternalIdsBuilder.class); PowerMockito.whenNew(BridgeExternalIdsBuilder.class).withNoArguments().thenReturn(bridgeExternalIdsBuilder); when(bridgeExternalIdsBuilder.setBridgeExternalIdKey(anyString())).thenReturn(bridgeExternalIdsBuilder); when(bridgeExternalIdsBuilder.setBridgeExternalIdValue(anyString())).thenReturn(bridgeExternalIdsBuilder); when(bridgeExternalIdsBuilder.build()).thenReturn(mock(BridgeExternalIds.class)); OvsdbBridgeAugmentationBuilder ovsdbBridgeAugmentationBuilder = mock(OvsdbBridgeAugmentationBuilder.class); when(ovsdbBridgeAugmentationBuilder.setBridgeOtherConfigs(any(List.class))) .thenReturn(ovsdbBridgeAugmentationBuilder); Whitebox.invokeMethod(ovsdbBridgeUpdateCommand, "setExternalIds", ovsdbBridgeAugmentationBuilder, bridge); verify(bridge).getExternalIdsColumn(); verify(bridgeExternalIdsBuilder).setBridgeExternalIdKey(anyString()); verify(bridgeExternalIdsBuilder).setBridgeExternalIdValue(anyString()); }