### Question:
SearchUtils { public static DateFormat getISODateFormat() { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSXX"); sdf.setTimeZone(TimeZone.getTimeZone("GMT")); sdf.setLenient(false); return sdf; }  static Properties loadProperties(String path); static String trimToNull(String value); static List<String> safeList(List<String> values); static boolean isBlank(String value); static boolean isBlank(Object value); static String convertJsonMapToString(Map<String, Object> jsonMapValue); static DateFormat getISODateFormat(); static Date dateFromISOString(String string, boolean silent); static boolean isDateAfter(Object date, int thresholdInMinutes); static Map<String, Object> convertToJsonMap(String jsonData); static Integer getIntegerFromJsonMap(Map<String, Object> map, String key); @SuppressWarnings("unchecked") static List<String> getListOfStringsFromJsonMap(Map<String, Object> map, String key); static void mergeJsonMaps(Map<String, Object> source, Map<String, Object> target); static Map<String, Object> collapseURLParams(MultivaluedMap<String, String> params); static boolean isMysqlDialect(String databaseProductName);  }### Answer:
@Test public void getISODateFormat() throws ParseException { DateFormat df = SearchUtils.getISODateFormat(); SimpleDateFormat previousdf = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ"); previousdf.setTimeZone(TimeZone.getTimeZone("GMT")); previousdf.setLenient(false); Assert.assertEquals( 1361386810123l , df.parse("2013-02-20T20:00:10.123+0100").getTime() ); Assert.assertEquals( 1361386810123l , previousdf.parse("2013-02-20T20:00:10.123+0100").getTime() ); Assert.assertEquals( 1361390410123l , df.parse("2013-02-20T20:00:10.123Z").getTime() ); try { previousdf.parse("2013-02-20T20:00:10.123Z").getTime(); Assert.fail(); } catch (ParseException e) { } try { df.parse("badvalue"); Assert.fail(); } catch (ParseException e) { } try { previousdf.parse("badvalue"); Assert.fail(); } catch (ParseException e) { } }