### Question:
OvsdbPortUpdateCommand extends AbstractTransactionCommand { @VisibleForTesting void buildTerminationPoint(ReadWriteTransaction transaction, InstanceIdentifier<TerminationPoint> tpPath, OvsdbTerminationPointAugmentationBuilder tpAugmentationBuilder, Node node, Entry<UUID, Port> portUpdate) { tpAugmentationBuilder .setName(portUpdate.getValue().getName()); tpAugmentationBuilder.setPortUuid(new Uuid( portUpdate.getValue().getUuid().toString())); updatePort(transaction, node, tpPath, portUpdate, tpAugmentationBuilder); } OvsdbPortUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@Test @SuppressWarnings("unchecked") public void testBuildTerminationPoint() throws Exception { Port portUpdate = mock(Port.class); Entry<UUID,Port> portEntry = mock(Entry.class); when(portEntry.getValue()).thenReturn(mock(Port.class)); when(portEntry.getValue().getName()).thenReturn(PORT_NAME); when(portEntry.getValue().getUuid()).thenReturn(mock(UUID.class)); when(portUpdate.getName()).thenReturn(PORT_NAME); when(portUpdate.getUuid()).thenReturn(mock(UUID.class)); PowerMockito.whenNew(Uuid.class).withAnyArguments().thenReturn(mock(Uuid.class)); OvsdbTerminationPointAugmentationBuilder tpAugmentationBuilder = mock( OvsdbTerminationPointAugmentationBuilder.class); when(tpAugmentationBuilder.setName(anyString())).thenReturn(tpAugmentationBuilder); when(tpAugmentationBuilder.setPortUuid(any(Uuid.class))).thenReturn(tpAugmentationBuilder); doNothing().when(ovsdbPortUpdateCommand).updatePort(any(ReadWriteTransaction.class), any(Node.class), any(InstanceIdentifier.class), any(Entry.class), any(OvsdbTerminationPointAugmentationBuilder.class)); Node node = mock(Node.class); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); InstanceIdentifier<TerminationPoint> tpPath = mock(InstanceIdentifier.class); Whitebox.invokeMethod(ovsdbPortUpdateCommand, "buildTerminationPoint", transaction, tpPath, tpAugmentationBuilder, node, portEntry); verify(tpAugmentationBuilder).setName(anyString()); verify(tpAugmentationBuilder).setPortUuid(any(Uuid.class)); verify(ovsdbPortUpdateCommand).updatePort(any(ReadWriteTransaction.class), any(Node.class), any(InstanceIdentifier.class), any(Entry.class), any(OvsdbTerminationPointAugmentationBuilder.class)); }