### Question:
OvsdbPortUpdateCommand extends AbstractTransactionCommand { @VisibleForTesting void updateOfPortRequest(final Interface interf, final OvsdbTerminationPointAugmentationBuilder ovsdbTerminationPointBuilder) { Set<Long> ofPortRequests = null; try { ofPortRequests = interf.getOpenFlowPortRequestColumn().getData(); } catch (ColumnSchemaNotFoundException e) { LOG.warn("Cannot find openflow column", e); } if (ofPortRequests != null && !ofPortRequests.isEmpty()) { Iterator<Long> ofPortRequestsIter = ofPortRequests.iterator(); int ofPort = ofPortRequestsIter.next().intValue(); if (ofPort >= 0) { ovsdbTerminationPointBuilder.setOfportRequest(Uint16.valueOf(ofPort)); } else { LOG.debug("Received negative value for ofPort from ovsdb for {} {}", interf.getName(),ofPort); } } } OvsdbPortUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testUpdateOfPortRequest() throws Exception { Interface interf = mock(Interface.class); Set<Long> ofPortRequests = new HashSet<>(); ofPortRequests.add((long) 10000); Column<GenericTableSchema, Set<Long>> column = mock(Column.class); when(interf.getOpenFlowPortRequestColumn()).thenReturn(column); when(column.getData()).thenReturn(ofPortRequests); OvsdbTerminationPointAugmentationBuilder ovsdbTerminationPointBuilder = mock( OvsdbTerminationPointAugmentationBuilder.class); when(ovsdbTerminationPointBuilder.setOfportRequest(any(Uint16.class))) .thenReturn(ovsdbTerminationPointBuilder); when(interf.getName()).thenReturn(INTERFACE_NAME); Whitebox.invokeMethod(ovsdbPortUpdateCommand, "updateOfPortRequest", interf, ovsdbTerminationPointBuilder); verify(ovsdbTerminationPointBuilder).setOfportRequest(any(Uint16.class)); }