@Test public void saveCreatesAscendingAccountNumbers(){ final Account jacksAccount = new Account("jack's"); final Account annasAccount = new Account("anna's"); assertNull(jacksAccount.getId()); assertNull(annasAccount.getId()); testee.save(jacksAccount); final Long jacksAccountId = jacksAccount.getId(); assertNotNull(jacksAccountId); testee.save(annasAccount); final Long annasAccountId = annasAccount.getId(); assertNotNull(annasAccountId); assertThat(annasAccountId, greaterThan(jacksAccountId)); assertEquals(annasAccountId, annasAccount.accountNo().toLong()); assertEquals(jacksAccountId, jacksAccount.accountNo().toLong()); }
public Account save(final Account account){ return impl.save(account); }
AccountJpaRepository implements AccountRepository { public Account save(final Account account){ return impl.save(account); } }
AccountJpaRepository implements AccountRepository { public Account save(final Account account){ return impl.save(account); } @Autowired  AccountJpaRepository(final ImportedAccountJpaRepository impl); }
AccountJpaRepository implements AccountRepository { public Account save(final Account account){ return impl.save(account); } @Autowired  AccountJpaRepository(final ImportedAccountJpaRepository impl); @Override Optional<Account> find(AccountNo acccountNo); void deleteAll(); Account save(final Account account); }
AccountJpaRepository implements AccountRepository { public Account save(final Account account){ return impl.save(account); } @Autowired  AccountJpaRepository(final ImportedAccountJpaRepository impl); @Override Optional<Account> find(AccountNo acccountNo); void deleteAll(); Account save(final Account account);  }