@Test
public void testUnstake() {

  // given
  final AccountOperation mockOperation = mock(AccountOperation.class);
  when(mockOperation.unstakeTx(any(Signer.class), any(Aer.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);
  final TxHash txHash = transactionApi.unstake(anyAmount);
  assertNotNull(txHash);
}