### Question:
TypeUtil { static public Object parse(DataType dataType, String value){ switch(dataType){ case STRING: return value; case INTEGER: return parseInteger(value); case FLOAT: return parseFloat(value); case DOUBLE: return parseDouble(value); case BOOLEAN: return parseBoolean(value); case DATE: return parseDate(value); case TIME: return parseTime(value); case DATE_TIME: return parseDateTime(value); case DATE_DAYS_SINCE_1960: return new DaysSinceDate(YEAR_1960, parseDate(value)); case DATE_DAYS_SINCE_1970: return new DaysSinceDate(YEAR_1970, parseDate(value)); case DATE_DAYS_SINCE_1980: return new DaysSinceDate(YEAR_1980, parseDate(value)); case TIME_SECONDS: return new SecondsSinceMidnight(parseSeconds(value)); case DATE_TIME_SECONDS_SINCE_1960: return new SecondsSinceDate(YEAR_1960, parseDateTime(value)); case DATE_TIME_SECONDS_SINCE_1970: return new SecondsSinceDate(YEAR_1970, parseDateTime(value)); case DATE_TIME_SECONDS_SINCE_1980: return new SecondsSinceDate(YEAR_1980, parseDateTime(value)); default: break; } throw new EvaluationException(); } private  TypeUtil(); static boolean equals(DataType dataType, Object left, Object right); @SuppressWarnings ( value = {"rawtypes", "unchecked"} ) static int compare(DataType dataType, Object left, Object right); static Object parseOrCast(DataType dataType, Object value); static Object parse(DataType dataType, String value); static String format(Object value); static DataType getDataType(Object value); static DataType getResultDataType(DataType left, DataType right); static OpType getOpType(DataType dataType); static Object cast(DataType dataType, Object value); static DataType getConstantDataType(String string);  }### Answer:
@Test public void parse(){ assertEquals(1, TypeUtil.parse(DataType.INTEGER, "1")); assertEquals(1, TypeUtil.parse(DataType.INTEGER, "1.0")); assertEquals(1, TypeUtil.parse(DataType.INTEGER, "1e+0")); }