ApiUtils { public static Date newDateFromString(String value) { return new Date(newInstantFromString(value).getMillis()); } private  ApiUtils(); static Instant newInstantFromString(String value); static Date newDateFromString(String value); static Date newDateFromMillis(long millis); static Period newPeriodFromString(String value); static String printDate(Date date); static String printDate(Instant instant); static Date getFromDate(
      String fromString, Date toDate, Duration window); static T baseEquals(T object, Object other); static void checkOffsetAndLimit(int offset, int limit); static void checkLimit(int limit); final static String DOT_SNAPSHOT_DIR; }
@Test public void testDateTimeConversion() throws IOException { long millis = 1334313693053L; String dateStr = MAPPER.readValue( MAPPER.writeValueAsString(new Date(millis)), String.class); Date date = ApiUtils.newDateFromString(dateStr); assertEquals(millis, date.getTime()); }