ParsingUtils { public static String formatSampleText(final List<String> lines, final int maxTrim) { StringBuilder sb = new StringBuilder(); for (int i = 0; i < lines.size(); i++) { sb.append(trimLeadingWhitespace(lines.get(i), maxTrim)); if (i + 1 < lines.size()) { sb.append("\n"); } } return sb.toString(); }  static boolean fileMatchesExtension(final File file,
            final String targetExtension); static String formatSampleText(final List<String> lines,
            final int maxTrim); static int getMinWhitespace(final List<String> lines); static int getLeadingWhitespace(final String str); static String trimLeadingWhitespace(final String str, final int max); static String assertFieldHasContent(final String field,
            final String value); static boolean checkAndLogIfNoContent(String sampleId, String field, String value);  }
@Test public void formatSampleText() { List<String> lines = new ArrayList<String>(); lines.add(" ONE"); lines.add(" TWO"); lines.add(" THREE"); assertEquals(ParsingUtils.formatSampleText(lines, 1), "ONE\n TWO\nTHREE"); }