*/
public void testNumberControlMinMaxValidation() throws Exception {
MockHttpServletRequest correctValueRequest = new MockHttpServletRequest();
correctValueRequest.addParameter("myNumberInput", "50");
NumberControl nc = new NumberControl();
nc._getComponent().init(new MockEnviroment());
nc.setMinValue(new BigInteger("25"));
nc.setMaxValue(new BigInteger("75"));
MockUiLibUtil.emulateHandleRequest(nc, "myNumberInput", correctValueRequest);
nc.convertAndValidate();
assertTrue("Number control must be valid.", nc.isValid());
assertTrue("Number control value must be '50'.", ((BigInteger) nc.getRawValue()).longValue() == 50L);
MockHttpServletRequest tooLittleValueRequest = new MockHttpServletRequest();
tooLittleValueRequest.addParameter("myNumberInput", "20");
MockUiLibUtil.emulateHandleRequest(nc, "myNumberInput", tooLittleValueRequest);
nc.convertAndValidate();
assertTrue("Number control mustn't be valid.", !nc.isValid());
MockHttpServletRequest tooBigValueRequest = new MockHttpServletRequest();
tooBigValueRequest.addParameter("myNumberInput", "80");
MockUiLibUtil.emulateHandleRequest(nc, "myNumberInput", tooBigValueRequest);
nc.convertAndValidate();
assertTrue("Number control mustn't be valid.", !nc.isValid());
nc._getComponent().destroy();
}