@Test public void testGetStakeInfo() throws Exception { final AccountTemplate accountTemplate = new AccountTemplate(contextStorage); final Requester mockRequester = mock(Requester.class); final StakeInfo expected = StakeInfo.newBuilder().build(); when(mockRequester.request(ArgumentMatchers.<Invocation<?>>any())) .thenReturn(expected); accountTemplate.requester = mockRequester; assertEquals(expected, accountTemplate.getStakingInfo(anyAccountAddress)); assertEquals(expected, accountTemplate.getStakeInfo(anyAccountAddress)); }
@Override public StakeInfo getStakeInfo(AccountAddress accountAddress) { return request(accountMethods.getStakeInfo(), Arrays.<Object>asList(accountAddress)); }
AccountTemplate extends AbstractTemplate implements AccountOperation { @Override public StakeInfo getStakeInfo(AccountAddress accountAddress) { return request(accountMethods.getStakeInfo(), Arrays.<Object>asList(accountAddress)); } }
AccountTemplate extends AbstractTemplate implements AccountOperation { @Override public StakeInfo getStakeInfo(AccountAddress accountAddress) { return request(accountMethods.getStakeInfo(), Arrays.<Object>asList(accountAddress)); } AccountTemplate(final ContextStorage<Context> contextStorage); }
AccountTemplate extends AbstractTemplate implements AccountOperation { @Override public StakeInfo getStakeInfo(AccountAddress accountAddress) { return request(accountMethods.getStakeInfo(), Arrays.<Object>asList(accountAddress)); } AccountTemplate(final ContextStorage<Context> contextStorage); @Override AccountState getState(final Account account); @Override AccountState getState(final AccountAddress address); @Override TxHash createName(final Account account, final String name, final long nonce); @Override TxHash createName(final Signer signer, final String name, final long nonce); @Override TxHash createNameTx(final Signer signer, final Name name, final long nonce); @Override TxHash updateName(final Account owner, final String name, final AccountAddress newOwner,
      final long nonce); @Override TxHash updateName(final Signer signer, final String name, final AccountAddress newOwner,
      final long nonce); @Override TxHash updateNameTx(final Signer signer, final Name name, final AccountAddress newOwner,
      final long nonce); @Override AccountAddress getNameOwner(final String name); @Override AccountAddress getNameOwner(final Name name); @Override AccountAddress getNameOwner(final String name, final long blockNumber); @Override AccountAddress getNameOwner(final Name name, long blockNumber); @Override TxHash stake(final Account account, final Aer amount, final long nonce); @Override TxHash stake(final Signer signer, final Aer amount, final long nonce); @Override TxHash stakeTx(final Signer signer, final Aer amount, final long nonce); @Override TxHash unstake(final Account account, final Aer amount, final long nonce); @Override TxHash unstake(final Signer signer, final Aer amount, final long nonce); @Override TxHash unstakeTx(final Signer signer, final Aer amount, final long nonce); @Override StakeInfo getStakingInfo(final AccountAddress accountAddress); @Override StakeInfo getStakeInfo(AccountAddress accountAddress); @Override TxHash vote(final Signer signer, final String voteId, final List<String> candidates,
      final long nonce); @Override TxHash voteTx(final Signer signer, final String voteId, final List<String> candidates,
      final long nonce); @Override AccountTotalVote getVotesOf(final AccountAddress accountAddress); @Override List<ElectedCandidate> listElected(final String voteId, final int showCount); @Override Transaction sign(final Account account, final RawTransaction rawTransaction); @Override boolean verify(final Account account, final Transaction transaction); }
AccountTemplate extends AbstractTemplate implements AccountOperation { @Override public StakeInfo getStakeInfo(AccountAddress accountAddress) { return request(accountMethods.getStakeInfo(), Arrays.<Object>asList(accountAddress)); } AccountTemplate(final ContextStorage<Context> contextStorage); @Override AccountState getState(final Account account); @Override AccountState getState(final AccountAddress address); @Override TxHash createName(final Account account, final String name, final long nonce); @Override TxHash createName(final Signer signer, final String name, final long nonce); @Override TxHash createNameTx(final Signer signer, final Name name, final long nonce); @Override TxHash updateName(final Account owner, final String name, final AccountAddress newOwner,
      final long nonce); @Override TxHash updateName(final Signer signer, final String name, final AccountAddress newOwner,
      final long nonce); @Override TxHash updateNameTx(final Signer signer, final Name name, final AccountAddress newOwner,
      final long nonce); @Override AccountAddress getNameOwner(final String name); @Override AccountAddress getNameOwner(final Name name); @Override AccountAddress getNameOwner(final String name, final long blockNumber); @Override AccountAddress getNameOwner(final Name name, long blockNumber); @Override TxHash stake(final Account account, final Aer amount, final long nonce); @Override TxHash stake(final Signer signer, final Aer amount, final long nonce); @Override TxHash stakeTx(final Signer signer, final Aer amount, final long nonce); @Override TxHash unstake(final Account account, final Aer amount, final long nonce); @Override TxHash unstake(final Signer signer, final Aer amount, final long nonce); @Override TxHash unstakeTx(final Signer signer, final Aer amount, final long nonce); @Override StakeInfo getStakingInfo(final AccountAddress accountAddress); @Override StakeInfo getStakeInfo(AccountAddress accountAddress); @Override TxHash vote(final Signer signer, final String voteId, final List<String> candidates,
      final long nonce); @Override TxHash voteTx(final Signer signer, final String voteId, final List<String> candidates,
      final long nonce); @Override AccountTotalVote getVotesOf(final AccountAddress accountAddress); @Override List<ElectedCandidate> listElected(final String voteId, final int showCount); @Override Transaction sign(final Account account, final RawTransaction rawTransaction); @Override boolean verify(final Account account, final Transaction transaction);  }