@Test
public void testStakeTx() throws Exception {

  // given
  final AccountTemplate accountTemplate = new AccountTemplate(contextStorage);
  final Requester mockRequester = mock(Requester.class);
  final TxHash expected = TxHash.of(BytesValue.EMPTY);
  when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any()))
      .thenReturn(expected);
  accountTemplate.requester = mockRequester;
  // then
  final Account deprecatedOne = new AccountFactory().create(new AergoKeyGenerator().create());
  assertEquals(expected, accountTemplate.stake(deprecatedOne, anyAmount, anyNonce));
  assertEquals(expected, accountTemplate.stake(anySigner, anyAmount, anyNonce));
  assertEquals(expected, accountTemplate.stakeTx(anySigner, anyAmount, anyNonce));
}