Utils { public static String formatTime(LocalDateTime time) { return DateTimeFormatter.ISO_LOCAL_DATE_TIME.format(time); } private  Utils(); static void checkNotNull(Object argument, String argumentName); static void checkArgument(boolean assertion, String message); static Map<String, Method> getGetters(final Class<?> type); static String formatTime(LocalDateTime time); static String formatDuration(Duration duration); static String formatErrorThreshold(final long errorThreshold); static List<P> extractPayloads(final List<? extends Record<P>> records); static Class<?> getGenericTypeNameFromTypeConverter(TypeConverter<?, ?> typeConverter, int genericTypeIndex); static final String LINE_SEPARATOR; static final String FILE_SEPARATOR; static final String JAVA_IO_TMPDIR; static final String NOT_APPLICABLE; }
@Test public void testFormatTime() { LocalDateTime time = LocalDateTime.of(2020, 1, 20, 10, 15, 20); assertThat(Utils.formatTime(time)).isEqualTo("2020-01-20T10:15:20"); }