### Question:
OvsdbPortUpdateCommand extends AbstractTransactionCommand { @SuppressWarnings("unchecked") @VisibleForTesting InstanceIdentifier<TerminationPoint> getInstanceIdentifier(InstanceIdentifier<Node> bridgeIid,Port port) { if (port.getExternalIdsColumn() != null && port.getExternalIdsColumn().getData() != null && port.getExternalIdsColumn().getData().containsKey(SouthboundConstants.IID_EXTERNAL_ID_KEY)) { String iidString = port.getExternalIdsColumn().getData().get(SouthboundConstants.IID_EXTERNAL_ID_KEY); return (InstanceIdentifier<TerminationPoint>) instanceIdentifierCodec.bindingDeserializerOrNull(iidString); } else { return bridgeIid.child(TerminationPoint.class, new TerminationPointKey(new TpId(port.getName()))); } } OvsdbPortUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema); @Override void execute(ReadWriteTransaction transaction);  }### Answer:
@SuppressWarnings("unchecked") @Test @Ignore("Broken mock-based test") public void testGetInstanceIdentifier() throws Exception { Port port = mock(Port.class); Column<GenericTableSchema, Map<String, String>> column = mock(Column.class); when(port.getExternalIdsColumn()).thenReturn(column); Map<String, String> map = new HashMap<>(); map.put(SouthboundConstants.IID_EXTERNAL_ID_KEY, "opendaylight-iid"); when(column.getData()).thenReturn(map); PowerMockito.mockStatic(SouthboundUtil.class); InstanceIdentifier<TerminationPoint> terminationPointIId = mock(InstanceIdentifier.class); InstanceIdentifier<Node> bridgeIid = mock(InstanceIdentifier.class); assertEquals(terminationPointIId, Whitebox.invokeMethod(ovsdbPortUpdateCommand, "getInstanceIdentifier", bridgeIid, port)); }