### Question:
DateUtils { public static void setConf(Configuration conf) { String tz = ConfigurationService.get(conf, OOZIE_PROCESSING_TIMEZONE_KEY); if (!VALID_TIMEZONE_PATTERN.matcher(tz).matches()) { throw new RuntimeException("Invalid Oozie timezone, it must be 'UTC' or 'GMT(+/-)####"); } ACTIVE_TIMEZONE = TimeZone.getTimeZone(tz); OOZIE_IN_UTC = ACTIVE_TIMEZONE.equals(UTC); ACTIVE_MASK = (OOZIE_IN_UTC) ? ISO8601_UTC_MASK : ISO8601_TZ_MASK_WITHOUT_OFFSET + tz.substring(3); }  static void setConf(Configuration conf); static TimeZone getOozieProcessingTimeZone(); static String getOozieTimeMask(); static TimeZone getTimeZone(String tzId); static Date parseDateUTC(String s); static Date parseDateOozieTZ(String s); static String formatDateOozieTZ(Date d); static String formatDateCustom(Date d, String format); static String formatDateEpoch(Date d, Boolean millis); static String formatDateOozieTZ(Calendar c); static String formatDate(Calendar c); static int hoursInDay(Calendar cal); static boolean isDSTChangeDay(Calendar cal); static void moveToEnd(Calendar cal, TimeUnit endOfFlag); static Calendar getCalendar(String dateString, TimeZone tz); static Calendar getCalendar(String dateString); static java.util.Date toDate(java.sql.Timestamp timestamp); static Timestamp convertDateToTimestamp(Date d); static final TimeZone UTC; static final String ISO8601_UTC_MASK; static final String OOZIE_PROCESSING_TIMEZONE_KEY; static final String OOZIE_PROCESSING_TIMEZONE_DEFAULT; }### Answer:
@Test(expected = RuntimeException.class) public void testInvalidOozieTimeZone() throws Exception { Configuration conf = new XConfiguration(); conf.set(DateUtils.OOZIE_PROCESSING_TIMEZONE_KEY, "US/Los Angeles"); DateUtils.setConf(conf); }
@Test(expected = RuntimeException.class) public void testInvalidOozieTimeZoneGMTPrefix() throws Exception { Configuration conf = new XConfiguration(); conf.set(DateUtils.OOZIE_PROCESSING_TIMEZONE_KEY, "xGMT-0300"); DateUtils.setConf(conf); }
@Test(expected = RuntimeException.class) public void testInvalidOozieTimeZoneGMTPostfix() throws Exception { Configuration conf = new XConfiguration(); conf.set(DateUtils.OOZIE_PROCESSING_TIMEZONE_KEY, "GMT-0300x"); DateUtils.setConf(conf); }