@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());
}