### Question:
OpenVSwitchUpdateCommand extends AbstractTransactionCommand { private static void setDataPathTypes(OvsdbNodeAugmentationBuilder ovsdbNodeBuilder, OpenVSwitch openVSwitch) { try { Set<String> dptypes = openVSwitch.getDatapathTypesColumn() .getData(); List<DatapathTypeEntry> dpEntryList = new ArrayList<>(); for (String dpType : dptypes) { if (SouthboundMapper.createDatapathType(dpType) != null) { DatapathTypeEntry dpEntry = new DatapathTypeEntryBuilder() .setDatapathType( SouthboundMapper.createDatapathType(dpType)) .build(); dpEntryList.add(dpEntry); } else { LOG.warn("Datapath type {} not present in model", dpType); } } ovsdbNodeBuilder.setDatapathTypeEntry(dpEntryList); } catch (SchemaVersionMismatchException e) { schemaMismatchLog("datapath_types", SouthboundConstants.OPEN_V_SWITCH, e); } } OpenVSwitchUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testSetDataPathTypes() throws Exception { OpenVSwitch openVSwitch = mock(OpenVSwitch.class); Column<GenericTableSchema, Set<String>> column = mock(Column.class); when(openVSwitch.getDatapathTypesColumn()).thenReturn(column); when(column.getData()).thenReturn(ImmutableSet.of("netdev", "system")); OvsdbNodeAugmentationBuilder ovsdbNodeBuilder = new OvsdbNodeAugmentationBuilder(); Whitebox.invokeMethod(openVSwitchUpdateCommand, "setDataPathTypes", ovsdbNodeBuilder, openVSwitch); verify(openVSwitch).getDatapathTypesColumn(); Map<DatapathTypeEntryKey, DatapathTypeEntry> entries = ovsdbNodeBuilder.getDatapathTypeEntry(); assertEquals(2, entries.size()); assertTrue(entries.containsKey(new DatapathTypeEntryKey(DatapathTypeNetdev.class))); assertTrue(entries.containsKey(new DatapathTypeEntryKey(DatapathTypeSystem.class))); }