TransactionApiImpl extends AbstractApi implements TransactionApi { @Override public TxHash voteBp(List<String> candidates) { return vote("voteBP", candidates); }  @Override TxHash createName(final String name); @Override TxHash createName(final Name name); @Override TxHash updateName(final String name, final AccountAddress newOwner); @Override TxHash updateName(final Name name, final AccountAddress newOwner); @Override TxHash stake(final Aer amount); @Override TxHash unstake(final Aer amount); @Override TxHash voteBp(List<String> candidates); @Override TxHash vote(final String voteId, final List<String> candidates); @Override TxHash send(AccountAddress recipient, Aer amount, Fee fee); @Override TxHash send(final AccountAddress recipient, final Aer amount, final Fee fee,
      final BytesValue payload); @Override TxHash send(final String recipient, final Aer amount, final Fee fee); @Override TxHash send(final String recipient, final Aer amount, final Fee fee,
      final BytesValue payload); @Override TxHash send(final Name recipient, final Aer amount, final Fee fee); @Override TxHash send(final Name recipient, final Aer amount, final Fee fee,
      final BytesValue payload); @Override TxHash commit(final RawTransaction rawTransaction); @Override TxHash commit(final Transaction signedTransaction); @Override TxHash deploy(final ContractDefinition contractDefinition, final Fee fee); @Override TxHash redeploy(final ContractAddress existingContract,
      final ContractDefinition contractDefinition, final Fee fee); @Override TxHash execute(final ContractInvocation contractInvocation, final Fee fee);  }
@Test public void testVoteBP() { final AccountOperation mockOperation = mock(AccountOperation.class); when(mockOperation .voteTx(any(Signer.class), anyString(), ArgumentMatchers.<String>anyList(), anyLong())) .thenReturn(TxHash.of(BytesValue.EMPTY)); final AergoClient mockClient = mock(AergoClient.class); when(mockClient.getAccountOperation()).thenReturn(mockOperation); final ClientProvider mockClientProvider = mock(ClientProvider.class); when(mockClientProvider.getClient()).thenReturn(mockClient); final AergoKey signer = new AergoKeyGenerator().create(); final TransactionApi transactionApi = new TransactionApiImpl(mockClientProvider, signer, txRequester); final TxHash txHash = transactionApi.voteBp(anyCandidates); assertNotNull(txHash); }