@Test public void testUpdateName() { final AccountOperation mockOperation = mock(AccountOperation.class); when(mockOperation .updateNameTx(any(Signer.class), any(Name.class), any(AccountAddress.class), 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); assertNotNull(transactionApi.updateName(randomUUID().toString(), anyAccountAddress)); assertNotNull(transactionApi.updateName(anyName, anyAccountAddress)); }
@Override public TxHash updateName(final String name, final AccountAddress newOwner) { return updateName(Name.of(name), newOwner); }
TransactionApiImpl extends AbstractApi implements TransactionApi { @Override public TxHash updateName(final String name, final AccountAddress newOwner) { return updateName(Name.of(name), newOwner); } }
TransactionApiImpl extends AbstractApi implements TransactionApi { @Override public TxHash updateName(final String name, final AccountAddress newOwner) { return updateName(Name.of(name), newOwner); }  }
TransactionApiImpl extends AbstractApi implements TransactionApi { @Override public TxHash updateName(final String name, final AccountAddress newOwner) { return updateName(Name.of(name), newOwner); }  @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); }
TransactionApiImpl extends AbstractApi implements TransactionApi { @Override public TxHash updateName(final String name, final AccountAddress newOwner) { return updateName(Name.of(name), newOwner); }  @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);  }