### Question:
OvsdbNodeUpdateCommand implements TransactCommand { @Override public void execute(final TransactionBuilder transaction, final BridgeOperationalState state, final DataChangeEvent events, final InstanceIdentifierCodec instanceIdentifierCodec) { execute(transaction, TransactUtils.extractCreatedOrUpdated(events, OvsdbNodeAugmentation.class), instanceIdentifierCodec); }  @Override void execute(final TransactionBuilder transaction, final BridgeOperationalState state,
            final DataChangeEvent events, final InstanceIdentifierCodec instanceIdentifierCodec); @Override void execute(final TransactionBuilder transaction, final BridgeOperationalState state,
            final Collection<DataTreeModification<Node>> modifications,
            final InstanceIdentifierCodec instanceIdentifierCodec);  }### Answer:
@SuppressWarnings("unchecked") @Test public void testExecute() throws Exception { Map<InstanceIdentifier<OvsdbNodeAugmentation>, OvsdbNodeAugmentation> updated = new HashMap<>(); InstanceIdentifier<OvsdbNodeAugmentation> iid = mock(InstanceIdentifier.class); OvsdbNodeAugmentation ovsdbNode = mock(OvsdbNodeAugmentation.class); updated.put(iid, ovsdbNode); PowerMockito.mockStatic(TransactUtils.class); PowerMockito.when( TransactUtils.extractCreatedOrUpdated(any(DataChangeEvent.class), eq(OvsdbNodeAugmentation.class))) .thenReturn(updated); ConnectionInfo connectionInfo = mock(ConnectionInfo.class); when(ovsdbNode.getConnectionInfo()).thenReturn(connectionInfo); when(connectionInfo.getRemoteIp()).thenReturn(mock(IpAddress.class)); when(connectionInfo.getRemotePort()).thenReturn(mock(PortNumber.class)); OpenVSwitch ovs = mock(OpenVSwitch.class); TransactionBuilder transaction = mock(TransactionBuilder.class); when(transaction.getTypedRowWrapper(eq(OpenVSwitch.class))).thenReturn(ovs); OpenvswitchExternalIds externalId = new OpenvswitchExternalIdsBuilder() .setExternalIdKey(EXTERNAL_ID_KEY) .setExternalIdValue(EXTERNAL_ID_VALUE) .build(); when(ovsdbNode.getOpenvswitchExternalIds()).thenReturn(Map.of(externalId.key(), externalId)); PowerMockito.suppress(MemberMatcher.method(OvsdbNodeUpdateCommand.class, "stampInstanceIdentifier", TransactionBuilder.class, InstanceIdentifier.class, InstanceIdentifierCodec.class)); PowerMockito.suppress(MemberMatcher.methodsDeclaredIn(InstanceIdentifier.class)); doNothing().when(ovs).setExternalIds(any(ImmutableMap.class)); Mutate<GenericTableSchema> mutate = mock(Mutate.class); Operations op = setOpField(); Column<GenericTableSchema, Map<String, String>> column = mock(Column.class); when(ovs.getExternalIdsColumn()).thenReturn(column); when(column.getSchema()).thenReturn(mock(ColumnSchema.class)); when(column.getData()).thenReturn(new HashMap<>()); when(op.mutate(any(OpenVSwitch.class))).thenReturn(mutate); when(transaction.add(any(Operation.class))).thenReturn(transaction); OpenvswitchOtherConfigs otherConfig = new OpenvswitchOtherConfigsBuilder() .setOtherConfigKey(OTHER_CONFIG_KEY) .setOtherConfigValue(OTHER_CONFIG_VALUE) .build(); when(ovsdbNode.getOpenvswitchOtherConfigs()).thenReturn(Map.of(otherConfig.key(), otherConfig)); doNothing().when(ovs).setOtherConfig(any(ImmutableMap.class)); when(ovs.getOtherConfigColumn()).thenReturn(column); ovsdbNodeUpdateCommand.execute(transaction, mock(BridgeOperationalState.class), changes, mock(InstanceIdentifierCodec.class)); verify(ovs, times(2)).getExternalIdsColumn(); verify(transaction, times(2)).add(eq(null)); }