### Question:
ProtocolRemovedCommand implements TransactCommand { @Override public void execute(final TransactionBuilder transaction, final BridgeOperationalState state, final DataChangeEvent events, final InstanceIdentifierCodec instanceIdentifierCodec) { execute(transaction, state, TransactUtils.extractRemoved(events, ProtocolEntry.class), TransactUtils.extractCreatedOrUpdatedOrRemoved(events, OvsdbBridgeAugmentation.class)); }  @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 @Ignore("This needs to be rewritten") public void testExecute() throws Exception { PowerMockito.suppress(MemberMatcher.methodsDeclaredIn(InstanceIdentifier.class)); ProtocolEntry protocol = mock(ProtocolEntry.class); when(protocol.getProtocol()).thenAnswer( (Answer<Class<? extends OvsdbBridgeProtocolBase>>) invocation -> OvsdbBridgeProtocolOpenflow10.class); BridgeOperationalState bridgeOpState = mock(BridgeOperationalState.class); when(bridgeOpState.getProtocolEntry(any(InstanceIdentifier.class))).thenReturn(Optional.of(protocol)); InstanceIdentifier<ProtocolEntry> protocolIid = mock(InstanceIdentifier.class); removed.add(protocolIid); ProtocolRemovedCommand protocolRemovedCommand = mock(ProtocolRemovedCommand.class, Mockito.CALLS_REAL_METHODS); MemberModifier.field(ProtocolRemovedCommand.class,"removed").set(protocolRemovedCommand, removed); MemberModifier.field(ProtocolRemovedCommand.class,"updatedBridges").set(protocolRemovedCommand, updatedBridges); when(updatedBridges.get(any(InstanceIdentifier.class))).thenReturn(mock(OvsdbBridgeAugmentation.class)); Operations op = (Operations) setField("op"); Mutate<GenericTableSchema> mutate = mock(Mutate.class); when(op.mutate(any(Bridge.class))).thenReturn(mutate); Column<GenericTableSchema, Set<String>> column = mock(Column.class); Bridge bridge = mock(Bridge.class); when(bridge.getProtocolsColumn()).thenReturn(column); when(column.getSchema()).thenReturn(mock(ColumnSchema.class)); when(column.getData()).thenReturn(new HashSet<>()); when(mutate.addMutation(any(ColumnSchema.class), any(Mutator.class), any(Set.class))).thenReturn(mutate); TransactionBuilder transaction = mock(TransactionBuilder.class); when(transaction.getTypedRowWrapper(any(Class.class))).thenReturn(bridge); protocolRemovedCommand.execute(transaction, bridgeOpState, mock(DataChangeEvent.class), mock(InstanceIdentifierCodec.class)); Mockito.verify(transaction).add(any(Operation.class)); }