public void validateMonthlyPaymentAmount(String amount, String currency, String type) {
   if (type.equals(ArrangementType.MORTGAGE_ACCOUNT.toString())) {
     validateCurrencyAmount(amount, currency);
   } else if (!(amount.equals("") && currency.equals("")))
     throw new IllegalArgumentException(
         "This type of arrangement should not have a Monthly Payment");
 }
  public void validateReferenceNumber(String type, String referenceNumber) {
    if (type.equals(ArrangementType.MORTGAGE_ACCOUNT.toString())) {
      String regex = "^[0-9]+$";
      if (!referenceNumber.matches(regex))
        throw new IllegalArgumentException(referenceNumber + " is not a valid reference number");

    } else {
      if (!referenceNumber.equals(""))
        throw new IllegalArgumentException(referenceNumber + " is not a valid reference number");
    }
  }