*/
public void testFloatControlMinMaxValidation() throws Exception {
MockHttpServletRequest correctValueRequest = new MockHttpServletRequest();
correctValueRequest.addParameter("myFloatInput", "50.0018");
FloatControl nc = new FloatControl();
nc._getComponent().init(new MockEnviroment());
nc.setMinValue(new BigDecimal("25.001"));
nc.setMaxValue(new BigDecimal("75.002"));
MockUiLibUtil.emulateHandleRequest(nc, "myFloatInput", correctValueRequest);
nc.convertAndValidate();
assertTrue("Float control must be valid.", nc.isValid());
assertTrue("Float control value must be '50.0018'.", ((BigDecimal) nc.getRawValue()).doubleValue() == 50.0018);
MockHttpServletRequest tooLittleValueRequest = new MockHttpServletRequest();
tooLittleValueRequest.addParameter("myFloatInput", "20.1");
MockUiLibUtil.emulateHandleRequest(nc, "myFloatInput", tooLittleValueRequest);
nc.convertAndValidate();
assertTrue("Float control mustn't be valid.", !nc.isValid());
MockHttpServletRequest tooBigValueRequest = new MockHttpServletRequest();
tooBigValueRequest.addParameter("myFloatInput", "80.2");
MockUiLibUtil.emulateHandleRequest(nc, "myFloatInput", tooBigValueRequest);
nc.convertAndValidate();
assertTrue("Float control mustn't be valid.", !nc.isValid());
}