@Test
public void testUpdateName() {

  // given
  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);
  // then
  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));
}