@Test
public void castToByte() {

    assertEquals((byte) 10, TypeUtils.castToByte(Byte.valueOf("10")));
    assertEquals((byte) 10, TypeUtils.castToByte(Integer.valueOf("10")));
    assertEquals((byte) 10, TypeUtils.castToByte("10"));
    assertEquals((byte) 10, TypeUtils.castToByte("10", (byte) 10));
    assertEquals((byte) 10, TypeUtils.castToByte(null, (byte) 10));
}