public void debit(Double debitAmount){
  if (Double.compare(debitAmount,0.0d) > 0 && this.balance - debitAmount > -1) {
    apply(new AccountDebitedEvent(this.accountNo,debitAmount,this.balance));
  }
 else {
    throw new IllegalArgumentException("Cannot debit with the amount");
  }
}

public void debit ( Double debitAmount ) { if ( Double . compare ( debitAmount , 0.0d ) > 0 && this . balance - debitAmount > - 1 ) { apply ( new AccountDebitedEvent ( this . accountNo , debitAmount , this . balance ) ) ; } else { throw new IllegalArgumentException ( "Cannot debit with the amount" ) ; } }
business logic : cannot debit with a negative amount cannot debit with amount that leaves the account balance in a negative state
