Utils { public static String formatErrorThreshold(final long errorThreshold) { return errorThreshold == JobParameters.DEFAULT_ERROR_THRESHOLD ? NOT_APPLICABLE : valueOf(errorThreshold); } 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 testFormatErrorThreshold() { assertThat(Utils.formatErrorThreshold(1)).isEqualTo("1"); assertThat(Utils.formatErrorThreshold(5)).isEqualTo("5"); assertThat(Utils.formatErrorThreshold(DEFAULT_ERROR_THRESHOLD)).isEqualTo("N/A"); }