### Question:
OpenVSwitchUpdateCommand extends AbstractTransactionCommand { private static void setOvsVersion(OvsdbNodeAugmentationBuilder ovsdbNodeBuilder, OpenVSwitch openVSwitch) { try { ovsdbNodeBuilder.setOvsVersion(openVSwitch.getOvsVersionColumn().getData().iterator().next()); } catch (NoSuchElementException e) { LOG.debug("ovs_version is not set for this switch",e); } } OpenVSwitchUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testSetOvsVersion() throws Exception { OpenVSwitch openVSwitch = mock(OpenVSwitch.class); Column<GenericTableSchema, Set<String>> column = mock(Column.class); when(openVSwitch.getOvsVersionColumn()).thenReturn(column); when(column.getData()).thenReturn(ImmutableSet.of("v2.3.0")); OvsdbNodeAugmentationBuilder ovsdbNodeBuilder = mock(OvsdbNodeAugmentationBuilder.class); when(ovsdbNodeBuilder.setOvsVersion(anyString())).thenReturn(ovsdbNodeBuilder); Whitebox.invokeMethod(openVSwitchUpdateCommand, "setOvsVersion", ovsdbNodeBuilder, openVSwitch); verify(ovsdbNodeBuilder).setOvsVersion(anyString()); verify(openVSwitch).getOvsVersionColumn(); }