### Question:
TypeUtil { static public DataType getDataType(Object value){ if(value instanceof String){ return DataType.STRING; } else if(value instanceof Integer){ return DataType.INTEGER; } else if(value instanceof Float){ return DataType.FLOAT; } else if(value instanceof Double){ return DataType.DOUBLE; } else if(value instanceof Boolean){ return DataType.BOOLEAN; } else if(value instanceof LocalDate){ return DataType.DATE; } else if(value instanceof LocalTime){ return DataType.TIME; } else if(value instanceof LocalDateTime){ return DataType.DATE_TIME; } else if(value instanceof DaysSinceDate){ DaysSinceDate period = (DaysSinceDate)value; LocalDate epoch = period.getEpoch(); if((epoch).equals(YEAR_1960)){ return DataType.DATE_DAYS_SINCE_1960; } else if((epoch).equals(YEAR_1970)){ return DataType.DATE_DAYS_SINCE_1970; } else if((epoch).equals(YEAR_1980)){ return DataType.DATE_DAYS_SINCE_1980; } } else if(value instanceof SecondsSinceMidnight){ return DataType.TIME_SECONDS; } else if(value instanceof SecondsSinceDate){ SecondsSinceDate period = (SecondsSinceDate)value; LocalDate epoch = period.getEpoch(); if((epoch).equals(YEAR_1960)){ return DataType.DATE_TIME_SECONDS_SINCE_1960; } else if((epoch).equals(YEAR_1970)){ return DataType.DATE_TIME_SECONDS_SINCE_1970; } else if((epoch).equals(YEAR_1980)){ return DataType.DATE_TIME_SECONDS_SINCE_1980; } } 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 getDataType(){ assertEquals(DataType.STRING, TypeUtil.getDataType("value")); assertEquals(DataType.INTEGER, TypeUtil.getDataType(1)); assertEquals(DataType.FLOAT, TypeUtil.getDataType(1f)); assertEquals(DataType.DOUBLE, TypeUtil.getDataType(1d)); }