m.put("sender", new String[] {"foo@example.com"});
m.put("ccMyself", new String[] {"true"});
m.put("value", new String[] {"1234"});
Form f = formFactory.forModel(ContactBean.class).bind(m);
assertTrue(f.isValid());
ContactBean bean = (ContactBean)f.clean(ContactBean.class);
assertEquals(bean.getSubject(), "hello");
assertEquals(bean.getMessage(), "Hi there");
assertEquals(bean.getSender(), "foo@example.com");
assertEquals(bean.getCcMyself(), Boolean.TRUE);
assertEquals(bean.getValue(), new Long(1234));