@Test
  public void testEvaluate() throws HiveException, InterruptedException {
    HiveConf conf = new HiveConfForTest(getClass());
    conf.setVar(HiveConf.ConfVars.HIVE_DATETIME_FORMATTER, formatter);
    conf.setVar(HiveConf.ConfVars.HIVE_LOCAL_TIME_ZONE, zone);
    SessionState state = SessionState.start(conf);
    ObjectInspector[] argInspectors =
        new ObjectInspector[] { PrimitiveObjectInspectorFactory.writableStringObjectInspector,
            PrimitiveObjectInspectorFactory.getPrimitiveWritableConstantObjectInspector(TypeInfoFactory.stringTypeInfo,
                new Text(pattern)) };
    udf.initialize(argInspectors);
    Text result = (Text) udf.evaluate(new DeferredObject[] { new DeferredJavaObject(new Text(value)) });
    assertEquals(udfDisplayWithInputs(), expectedResult, result);
    SessionState.endStart(state);
  }
Tests for {@link GenericUDFDateFormat#evaluate(DeferredObject[])} with string value inputs.
ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFDateFormatEvaluate.java