public void testDateWritablepToDate() throws HiveException {
GenericUDFDate udf = new GenericUDFDate();
ObjectInspector valueOI = PrimitiveObjectInspectorFactory.writableDateObjectInspector;
ObjectInspector[] arguments = {valueOI};
udf.initialize(arguments);
DeferredObject valueObj = new DeferredJavaObject(new DateWritable(new Date(109, 06, 30)));
DeferredObject[] args = {valueObj};
Text output = (Text) udf.evaluate(args);
assertEquals("to_date() test for DATEWRITABLE failed ", "2009-07-30", output.toString());