### Question:
OozieELExtensions { public static String formatDateUTC(Date d) throws Exception { return (d != null) ? getISO8601DateFormat(UTC).format(d) : "NULL"; } private  OozieELExtensions(); static String ph1_dataIn_echo(String dataInName, String part); static String ph3_dataIn(String dataInName, String part); static String ph1_now_echo(int hr, int min); static String ph1_today_echo(int hr, int min); static String ph1_yesterday_echo(int hr, int min); static String ph1_currentWeek_echo(String weekDayName, int hr, int min); static String ph1_lastWeek_echo(String weekDayName, int hr, int min); static String ph1_currentMonth_echo(int day, int hr, int min); static String ph1_lastMonth_echo(int day, int hr, int min); static String ph1_currentYear_echo(int month, int day, int hr, int min); static String ph1_lastYear_echo(int month, int day, int hr, int min); static String ph2_now_inst(int hr, int min); static String ph2_today_inst(int hr, int min); static String ph2_yesterday_inst(int hr, int min); static String ph2_currentWeek_inst(String weekDayName, int hr, int min); static String ph2_lastWeek_inst(String weekDayName, int hr, int min); static String ph2_currentMonth_inst(int day, int hr, int min); static String ph2_lastMonth_inst(int day, int hr, int min); static String ph2_currentYear_inst(int month, int day, int hr, int min); static String ph2_lastYear_inst(int month, int day, int hr, int min); static String ph2_now(int hr, int min); static String formatDateUTC(Date d); static String formatDateUTC(Calendar c); static String ph2_today(int hr, int min); static String ph2_yesterday(int hr, int min); static String ph2_currentMonth(int day, int hr, int min); static String ph2_lastMonth(int day, int hr, int min); static String ph2_currentWeek(String weekDayName, int hr, int min); static String ph2_lastWeek(String weekDayName, int hr, int min); static String ph2_currentYear(int month, int day, int hr, int min); static String ph2_lastYear(int month, int day, int hr, int min); static final String DATE_FORMAT; static final TimeZone UTC; static final String COORD_CURRENT; }### Answer:
@Test(dataProvider = "optionalDatasets") public void testDataInOptional(String expuris, String partition, String doneFlag) throws Exception { ELEvaluator eval = createActionStartEvaluator(); String inName = "clicks"; eval.setVariable(".datain.clicks", null); Services.get().setService(DummyURIHandlerService.class); SyncCoordDataset ds = createDataSet("2007-09-30T010:00Z"); eval.setVariable(inName + ".frequency", String.valueOf(ds.getFrequency())); eval.setVariable(inName + ".freq_timeunit", ds.getTimeUnit().name()); eval.setVariable(inName + ".timezone", ds.getTimeZone().getID()); eval.setVariable(inName + ".end_of_duration", Timeunit.NONE.name()); eval.setVariable(inName + ".initial-instance", OozieELExtensions.formatDateUTC(ds.getInitInstance())); eval.setVariable(inName + ".done-flag", doneFlag); eval.setVariable(inName + ".uri-template", ds.getUriTemplate()); eval.setVariable(inName + ".start-instance", "now(-1,0)"); eval.setVariable(inName + ".end-instance", "now(0,0)"); eval.setVariable(OozieClient.USER_NAME, "test"); eval.setVariable(inName + ".empty-dir", "hdfs: Assert.assertEquals(CoordELFunctions.evalAndWrap(eval, "${dataIn('clicks', '" + partition + "')}"), expuris); }