### Question:
TransactInvokerImpl implements TransactInvoker { @Override public void invoke(TransactCommand command, BridgeOperationalState state, DataChangeEvent events, InstanceIdentifierCodec instanceIdentifierCodec) { TransactionBuilder tb = new TransactionBuilder(connectionInstance.getOvsdbClient(), dbSchema); command.execute(tb, state, events, instanceIdentifierCodec); invoke(command, tb); } TransactInvokerImpl(OvsdbConnectionInstance connectionInstance, DatabaseSchema dbSchema); @Override void invoke(TransactCommand command, BridgeOperationalState state,
            DataChangeEvent events, InstanceIdentifierCodec instanceIdentifierCodec); @Override void invoke(TransactCommand command, BridgeOperationalState state,
            Collection<DataTreeModification<Node>> modifications, InstanceIdentifierCodec instanceIdentifierCodec);  }### Answer:
@SuppressWarnings({ "rawtypes", "unchecked" }) @Test public void testInvoke() throws Exception { TransactCommand command = mock(TransactCommand.class); TransactionBuilder tb = mock(TransactionBuilder.class); PowerMockito.whenNew(TransactionBuilder.class).withAnyArguments().thenReturn(tb); doNothing().when(command).execute(any(TransactionBuilder.class), any(BridgeOperationalState.class), any(DataChangeEvent.class), any(InstanceIdentifierCodec.class)); ListenableFuture<List<OperationResult>> result = mock(ListenableFuture.class); when(tb.execute()).thenReturn(result); List<Operation> operation = new ArrayList<>(); operation.add(mock(Operation.class)); when(tb.getOperations()).thenReturn(operation); List<OperationResult> got = new ArrayList<>(); when(result.get()).thenReturn(got); transactInvokerImpl.invoke(command, mock(BridgeOperationalState.class), mock(DataChangeEvent.class), mock(InstanceIdentifierCodec.class)); verify(result).get(); }