@Test
public void castInteger(){

	try {
		TypeUtil.cast(DataType.INTEGER, Long.valueOf(Integer.MIN_VALUE - 1l));
		fail();
	} catch(TypeCheckException tce){
		// Ignored
	}
	try {
		TypeUtil.cast(DataType.INTEGER, Long.valueOf(Integer.MAX_VALUE + 1l));
		fail();
	} catch(TypeCheckException tce){
		// Ignored
	}
	assertEquals(1, TypeUtil.cast(DataType.INTEGER, 1f));
	assertEquals(1, TypeUtil.cast(DataType.INTEGER, 1.0f));
	try {
		TypeUtil.cast(DataType.INTEGER, Math.nextUp(1f));
		fail();
	} catch(TypeCheckException tce){
		// Ignored
	}
	assertEquals(1, TypeUtil.cast(DataType.INTEGER, 1d));
	assertEquals(1, TypeUtil.cast(DataType.INTEGER, 1.0d));
	try {
		TypeUtil.cast(DataType.INTEGER, Math.nextUp(1d));
		fail();
	} catch(TypeCheckException tce){
		// Ignored
	}
	try {
		TypeUtil.cast(DataType.INTEGER, Double.valueOf(Integer.MIN_VALUE - 1d));
		fail();
	} catch(TypeCheckException tce){
		// Ignored
	}
	try {
		TypeUtil.cast(DataType.INTEGER, Double.valueOf(Integer.MAX_VALUE + 1d));
		fail();
	} catch(TypeCheckException tce){
		// Ignored
	}
}