### Question:
OvsdbBridgeUpdateCommand extends AbstractTransactionCommand { @Override public void execute(ReadWriteTransaction transaction) { if (updatedBridgeRows == null || updatedBridgeRows.isEmpty()) { return; } final InstanceIdentifier<Node> connectionIId = getOvsdbConnectionInstance().getInstanceIdentifier(); Optional<Node> connection = SouthboundUtil.readNode(transaction, connectionIId); if (!connection.isPresent()) { return; } for (Entry<UUID, Bridge> entry : updatedBridgeRows.entrySet()) { updateBridge(transaction, entry.getValue(), connectionIId); } } OvsdbBridgeUpdateCommand(InstanceIdentifierCodec instanceIdentifierCodec, OvsdbConnectionInstance key,
            TableUpdates updates, DatabaseSchema dbSchema,
                                    Map<NodeId, Node> updatedBridgeNodes); @Override void execute(ReadWriteTransaction transaction); @Override void onSuccess(); @Override void onFailure(Throwable throwable);  }### Answer:
@Test public void testExecute() throws Exception { updatedBridgeRows.put(mock(UUID.class), mock(Bridge.class)); OvsdbConnectionInstance ovsdbConnectionInstance = mock(OvsdbConnectionInstance.class); when(ovsdbBridgeUpdateCommand.getOvsdbConnectionInstance()).thenReturn(ovsdbConnectionInstance); InstanceIdentifier<Node> connectionIId = mock(InstanceIdentifier.class); when(ovsdbConnectionInstance.getInstanceIdentifier()).thenReturn(connectionIId); Optional<Node> connection = Optional.of(mock(Node.class)); PowerMockito.mockStatic(SouthboundUtil.class); when(SouthboundUtil.readNode(any(ReadWriteTransaction.class), any(InstanceIdentifier.class))) .thenReturn(connection); ReadWriteTransaction transaction = mock(ReadWriteTransaction.class); MemberModifier.suppress(MemberMatcher.method(OvsdbBridgeUpdateCommand.class, "updateBridge", ReadWriteTransaction.class, Bridge.class, InstanceIdentifier.class)); ovsdbBridgeUpdateCommand.execute(transaction); verify(ovsdbBridgeUpdateCommand).updateBridge(any(ReadWriteTransaction.class), any(Bridge.class), any(InstanceIdentifier.class)); }