SavingsAccount savingsAccount = null;
final Long savingsId = command.longValueOfParameterNamed(ClientApiConstants.savingsAccountIdParamName);
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());
}