@Test
public void testToBooleanWithValidValues() throws Exception {

    assertEquals(true, new RequestParameter(null, "true").toBoolean());
    assertEquals(true, new RequestParameter(null, "TRUE").toBoolean());
    assertEquals(true, new RequestParameter(null, "yes").toBoolean());
    assertEquals(true, new RequestParameter(null, "YES").toBoolean());
    assertEquals(false, new RequestParameter(null, "false").toBoolean());
    assertEquals(false, new RequestParameter(null, "no").toBoolean());
    assertEquals(false, new RequestParameter(null, "1").toBoolean());
    assertEquals(false, new RequestParameter(null, "0").toBoolean());
    assertEquals(false, new RequestParameter(null, "foo").toBoolean());
}