@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);
    udf.initialize(argInspectors);
    try {
      Text result = (Text) udf.evaluate(new DeferredObject[] { new DeferredJavaObject(new LongWritable(value)), new DeferredJavaObject(new Text(pattern)) });
      assertEquals(udfDisplayWithInputs(), expectedResult, result.toString());
    }catch (RuntimeException e) {
      assertEquals(udfDisplayWithInputs(), expectedResult, e.getMessage());
    }
    SessionState.endStart(state);
  }
Tests for {@link GenericUDFFromUnixTime#evaluate(DeferredObject[])} with long value pattern inputs.
ql/src/test/org/apache/hadoop/hive/ql/udf/generic/TestGenericUDFFromUnixTimeEvaluate.java