@Override public void applyPromotion(final Owner owner, final Bonus bonus) { final Account account = accountService.findAccountByOwner(owner); Assert.state(account != null, "account doesn't exist"); final double updatedBalance = account.getBalance() + bonus.getBonusAmount(); accountService.updateAccountBalance(account, updatedBalance); }
@Override public Collection<Account> findRichPeople() { return accountService.findAccountsWithBalanceGreaterThan(MILLION); }