@Test
public void castToLong() {

    assertEquals(10L, TypeUtils.castToLong(Integer.valueOf("10")));
    assertEquals(10L, TypeUtils.castToLong(Long.valueOf("10")));
    assertEquals(10L, TypeUtils.castToLong("10"));
    assertEquals(10L, TypeUtils.castToLong("10", 10L));
    assertEquals(10L, TypeUtils.castToLong(null, 10L));
}