@Transactional
  @Override
  public EntityIdentifier approveDepositApplication(
      final DepositStateTransitionApprovalCommand command) {

    // AppUser currentUser = context.authenticatedUser();

    DepositStateTransitionApprovalCommandValidator validator =
        new DepositStateTransitionApprovalCommandValidator(command);
    validator.validate();

    DepositAccount account = this.depositAccountRepository.findOne(command.getAccountId());
    if (account == null || account.isDeleted()) {
      throw new DepositAccountNotFoundException(command.getAccountId());
    }

    // FIXME - madhukar - you are checking for loan permission here instead
    // of some specific deposit account permission.
    // removing check for now until rules dealing with creating and
    // maintaining deposit accounts in the past is clarified
    LocalDate eventDate = command.getEventDate();
    // if (this.isBeforeToday(eventDate) &&
    // currentUser.canNotApproveLoanInPast()) {
    // throw new
    // NoAuthorizationException("User has no authority to approve deposit with a date in the
    // past.");
    // }

    account.approve(
        eventDate,
        defaultDepositLifecycleStateMachine(),
        command,
        this.fixedTermDepositInterestCalculator);

    this.depositAccountRepository.save(account);

    String noteText = command.getNote();
    if (StringUtils.isNotBlank(noteText)) {
      Note note = Note.depositNote(account, noteText);
      this.noteRepository.save(note);
    }

    return new EntityIdentifier(account.getId());
  }