### Question:
OpenVSwitchUpdateCommand extends AbstractTransactionCommand { private void setOtherConfig(ReadWriteTransaction transaction, OvsdbNodeAugmentationBuilder ovsdbNodeBuilder, OpenVSwitch oldEntry, OpenVSwitch openVSwitch) { Map<String, String> oldOtherConfigs = null; Map<String, String> otherConfigs = null; if (openVSwitch.getOtherConfigColumn() != null) { otherConfigs = openVSwitch.getOtherConfigColumn().getData(); } if (oldEntry != null && oldEntry.getOtherConfigColumn() != null) { oldOtherConfigs = oldEntry.getOtherConfigColumn().getData(); } if (oldOtherConfigs != null && !oldOtherConfigs.isEmpty()) { removeOldConfigs(transaction, oldOtherConfigs, openVSwitch); } if (otherConfigs != null && !otherConfigs.isEmpty()) { setNewOtherConfigs(ovsdbNodeBuilder, otherConfigs); } } OpenVSwitchUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testSetOtherConfig() throws Exception { OpenVSwitch openVSwitch = mock(OpenVSwitch.class); Column<GenericTableSchema, Map<String, String>> column = mock(Column.class); when(openVSwitch.getOtherConfigColumn()).thenReturn(column); when(column.getData()).thenReturn(ImmutableMap.of("foo", "bar")); OpenVSwitch oldEntry = mock(OpenVSwitch.class); when(oldEntry.getOtherConfigColumn()).thenReturn(column); doNothing().when(openVSwitchUpdateCommand).removeOldConfigs(any(ReadWriteTransaction.class), any(Map.class), any(OpenVSwitch.class)); doNothing().when(openVSwitchUpdateCommand).setNewOtherConfigs(any(OvsdbNodeAugmentationBuilder.class), any(Map.class)); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); OvsdbNodeAugmentationBuilder ovsdbNodeBuilder = mock(OvsdbNodeAugmentationBuilder.class); Whitebox.invokeMethod(openVSwitchUpdateCommand, "setOtherConfig", transaction, ovsdbNodeBuilder, oldEntry, openVSwitch); verify(openVSwitch, times(2)).getOtherConfigColumn(); verify(oldEntry, times(2)).getOtherConfigColumn(); verify(openVSwitchUpdateCommand).removeOldConfigs(any(ReadWriteTransaction.class), any(Map.class), any(OpenVSwitch.class)); }