@Test
public void castToFloat() {

    assertEquals(10f, TypeUtils.castToFloat(Integer.valueOf("10")));
    assertEquals(10f, TypeUtils.castToFloat(Float.valueOf("10")));
    assertEquals(10f, TypeUtils.castToFloat("10"));
    assertEquals(10f, TypeUtils.castToFloat("10", 10f));
    assertEquals(10f, TypeUtils.castToFloat(null, 10f));
}