### Question:
OvsdbPortUpdateCommand extends AbstractTransactionCommand { @VisibleForTesting void updateInterfaces(Interface interfaceUpdate, final OvsdbTerminationPointAugmentationBuilder ovsdbTerminationPointBuilder) { Column<GenericTableSchema, String> typeColumn = interfaceUpdate.getTypeColumn(); String type = typeColumn.getData(); updateInterface(interfaceUpdate, type,ovsdbTerminationPointBuilder); } OvsdbPortUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@Test public void testBuildTerminationPoint1() throws Exception { Interface interfaceUpdate = mock(Interface.class); when(interfaceUpdate.getName()).thenReturn(INTERFACE_NAME); when(interfaceUpdate.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.setInterfaceUuid(any(Uuid.class))).thenReturn(tpAugmentationBuilder); doNothing().when(ovsdbPortUpdateCommand).updateInterfaces(any(Interface.class), any(OvsdbTerminationPointAugmentationBuilder.class)); Whitebox.invokeMethod(ovsdbPortUpdateCommand, "buildTerminationPoint", tpAugmentationBuilder, interfaceUpdate); verify(tpAugmentationBuilder).setName(anyString()); verify(tpAugmentationBuilder).setInterfaceUuid(any(Uuid.class)); verify(ovsdbPortUpdateCommand).updateInterfaces(any(Interface.class), any(OvsdbTerminationPointAugmentationBuilder.class)); }
@SuppressWarnings("unchecked") @Test public void testUpdateInterfaces() throws Exception { Interface interfaceUpdate = mock(Interface.class); Column<GenericTableSchema, String> typeColumn = mock(Column.class); when(interfaceUpdate.getTypeColumn()).thenReturn(typeColumn); when(typeColumn.getData()).thenReturn(OVSDB_INTERFACE_TYPE); doNothing().when(ovsdbPortUpdateCommand).updateInterface(any(Interface.class), anyString(), any(OvsdbTerminationPointAugmentationBuilder.class)); OvsdbTerminationPointAugmentationBuilder ovsdbTerminationPointBuilder = mock( OvsdbTerminationPointAugmentationBuilder.class); Whitebox.invokeMethod(ovsdbPortUpdateCommand, "updateInterfaces", interfaceUpdate, ovsdbTerminationPointBuilder); verify(ovsdbPortUpdateCommand).updateInterface(any(Interface.class), anyString(), any(OvsdbTerminationPointAugmentationBuilder.class)); }