*/
public void testFloatControlSimpleValidation() throws Exception {
MockHttpServletRequest correctValueRequest = new MockHttpServletRequest();
correctValueRequest.addParameter("myFloatInput", "28.012");
FloatControl nc = new FloatControl();
nc._getComponent().init(new MockEnviroment());
MockUiLibUtil.emulateHandleRequest(nc, "myFloatInput", correctValueRequest);
nc.convertAndValidate();
assertTrue("Float control must be valid.", nc.isValid());
assertTrue("Float control value must be a 'BigDecimal'.", nc.getRawValue() instanceof BigDecimal);
assertTrue("Float control value must be '28.012'.", ((BigDecimal) nc.getRawValue()).doubleValue() == 28.012);
MockHttpServletRequest incorrectValueRequest = new MockHttpServletRequest();
incorrectValueRequest.addParameter("myFloatInput", "abcd");
MockUiLibUtil.emulateHandleRequest(nc, "myFloatInput", incorrectValueRequest);
nc.convertAndValidate();
assertTrue("Float control mustn't be valid.", !nc.isValid());
nc._getComponent().destroy();
}