if (savingsId != null) {
savingsAccount = this.savingsRepository.findOne(savingsId);
if (savingsAccount == null) { throw new SavingsAccountNotFoundException(savingsId); }
if (!savingsAccount.getClient().identifiedBy(clientId)) {
String defaultUserMessage = "saving account must belongs to client";
throw new InvalidClientSavingProductException("saving.account", "must.belongs.to.client", defaultUserMessage, savingsId,
clientForUpdate.getId());
}
clientForUpdate.updateSavingsAccount(savingsAccount);
}