AbstractAccount implements Account { @Override public long incrementAndGetNonce() { return nonce.incrementAndGet(); }  @Override void bindState(final AccountState state); @Override void setNonce(final long nonce); @Override long getRecentlyUsedNonce(); @Override long incrementAndGetNonce();  }
@Test public void testIncrementAndGetNonce() { final long nonce = 10; final AbstractAccount account = spy(AbstractAccount.class); account.setNonce(nonce); final long expected = nonce + 1; assertEquals(expected, account.incrementAndGetNonce()); assertEquals(expected, account.getRecentlyUsedNonce()); }