### Question:
OvsdbPortUpdateCommand extends AbstractTransactionCommand { @VisibleForTesting void updateVlan(final Port port, final OvsdbTerminationPointAugmentationBuilder ovsdbTerminationPointBuilder) { Collection<Long> vlanId = port.getTagColumn().getData(); if (vlanId.size() > 0) { Iterator<Long> itr = vlanId.iterator(); int id = itr.next().intValue(); ovsdbTerminationPointBuilder.setVlanTag(new VlanId(Uint16.valueOf(id))); } } OvsdbPortUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testUpdateVlan() throws Exception { Port port = mock(Port.class); Column<GenericTableSchema, Set<Long>> column = mock(Column.class); when(port.getTagColumn()).thenReturn(column); Set<Long> vlanId = new HashSet<>(); vlanId.add((long) 808); when(column.getData()).thenReturn(vlanId); PowerMockito.whenNew(VlanId.class).withAnyArguments().thenReturn(mock(VlanId.class)); OvsdbTerminationPointAugmentationBuilder ovsdbTerminationPointBuilder = mock( OvsdbTerminationPointAugmentationBuilder.class); when(ovsdbTerminationPointBuilder.setVlanTag(any(VlanId.class))).thenReturn(ovsdbTerminationPointBuilder); Whitebox.invokeMethod(ovsdbPortUpdateCommand, "updateVlan", port, ovsdbTerminationPointBuilder); verify(ovsdbTerminationPointBuilder).setVlanTag(any(VlanId.class)); }