Account implements TransactionBuilderAccount { @Override public Long getIncrementedSequenceNumber() { return new Long(mSequenceNumber + 1); } Account(KeyPair keypair, Long sequenceNumber); @Override KeyPair getKeypair(); @Override Long getSequenceNumber(); @Override Long getIncrementedSequenceNumber(); void incrementSequenceNumber();  }
@Test public void testGetIncrementedSequenceNumber() { Account account = new Account(KeyPair.random(), 100L); Long incremented; incremented = account.getIncrementedSequenceNumber(); assertEquals(new Long(100L), account.getSequenceNumber()); assertEquals(new Long(101L), incremented); incremented = account.getIncrementedSequenceNumber(); assertEquals(new Long(100L), account.getSequenceNumber()); assertEquals(new Long(101L), incremented); }