FeeActionForm extends BaseActionForm { public void setAmount(String amount) { this.amount = amount; }  String getFeeId(); Short getFeeIdValue(); void setFeeId(String feeId); void setCurrencyId(Short currencyId); Short getCurrencyId(); String getAmount(); void setAmount(String amount); String getCategoryType(); void setCategoryType(String categoryType); FeeCategory getCategoryTypeValue(); String getCustomerCharge(); void setCustomerCharge(String customerCharge); void setCustomerDefaultFee(boolean customerDefaultFee); boolean isCustomerDefaultFee(); String getFeeFormula(); void setFeeFormula(String feeFormula); FeeFormula getFeeFormulaValue(); String getFeeFrequencyType(); void setFeeFrequencyType(String feeFrequencyType); FeeFrequencyType getFeeFrequencyTypeValue(); String getFeeName(); void setFeeName(String feeName); String getFeePaymentType(); FeePayment getFeePaymentTypeValue(); String getFeeRecurrenceType(); void setFeeRecurrenceType(String feeRecurrenceType); RecurrenceType getFeeRecurrenceTypeValue(); String getFeeStatus(); void setFeeStatus(String feeStatus); FeeStatus getFeeStatusValue(); String getGlCode(); void setGlCode(String glCode); Short getGlCodeValue(); String getLoanCharge(); void setLoanCharge(String loanCharge); String getMonthRecurAfter(); void setMonthRecurAfter(String monthRecurAfter); Short getMonthRecurAfterValue(); String getRate(); void setRate(String rate); Double getRateValue(); String getWeekRecurAfter(); void setWeekRecurAfter(String weekRecurAfter); Short getWeekRecurAfterValue(); boolean isCategoryLoan(); boolean isRateFee(); boolean isToRemove(); void setToRemove(boolean toRemove); boolean isCantBeRemoved(); void setCantBeRemoved(boolean cantBeRemoved); @Override void reset(ActionMapping mapping, HttpServletRequest request); @Override ActionErrors validate(ActionMapping mapping, HttpServletRequest request); void updateWithFee(FeeDto fee); void clear();  }
@Test public void testIsAmountValidWithNonNumberString() { form.setAmount("aaa"); Assert.assertFalse(isAmountValid(form)); }
@Test public void testIsAmountValidWithValidString() { form.setAmount("2.5"); Assert.assertTrue(isAmountValid(form)); }
@Test public void testIsAmountValidWithTooMuchPrecision() { form.setAmount("2.12345"); Assert.assertFalse(isAmountValid(form)); }
@Test public void testIsAmountValidWithZero() { form.setAmount("0.0"); Assert.assertFalse(isAmountValid(form)); }
@Test public void testIsAmountValidWithTooLargeANumber() { form.setAmount("123456789111111.5"); Assert.assertFalse(isAmountValid(form)); }