@Test public void testGetDuration() { String actual = ETLUtil.getDuration(OffsetDateTime.now().toInstant().toEpochMilli()); Pattern patternFormat = Pattern.compile("\\d{2}:\\d{2}:\\d{2}"); Pattern validFormat = Pattern.compile("[0-2]|[0-9]:[0-5]|[0-9]:[0-5]|[0-9]"); Matcher matcherFormat = patternFormat.matcher(actual); Matcher matcherValidFormat = validFormat.matcher(actual); assertTrue("01", matcherFormat.find()); assertTrue("02",matcherValidFormat.find()); }
public static String getDuration(long start) { return getDuration(start, System.currentTimeMillis()); }
ETLUtil { public static String getDuration(long start) { return getDuration(start, System.currentTimeMillis()); } }
ETLUtil { public static String getDuration(long start) { return getDuration(start, System.currentTimeMillis()); } ETLUtil(); }
ETLUtil { public static String getDuration(long start) { return getDuration(start, System.currentTimeMillis()); } ETLUtil(); static Throwable getRootCause(Throwable t); static void logDuration(Logger logger, Class<?> cls, long start); static String getDuration(long start); static String getDuration(long start, long end); static String getSpecimenPurl(String unitID); static Logger getLogger(Class<?> forClass); static void truncate(DocumentType<T> dt); static void truncate(DocumentType<T> dt, SourceSystem ss); static String[] getTestGenera(); }
ETLUtil { public static String getDuration(long start) { return getDuration(start, System.currentTimeMillis()); } ETLUtil(); static Throwable getRootCause(Throwable t); static void logDuration(Logger logger, Class<?> cls, long start); static String getDuration(long start); static String getDuration(long start, long end); static String getSpecimenPurl(String unitID); static Logger getLogger(Class<?> forClass); static void truncate(DocumentType<T> dt); static void truncate(DocumentType<T> dt, SourceSystem ss); static String[] getTestGenera();  }