LexicalIncludePaths { @NotNull public static String trimPathSeparators(@NotNull String path) { String result = path; if (result.endsWith(UNIX_SEPARATOR)) { result = result.substring(0, result.length() - 1); } if (result.startsWith(UNIX_SEPARATOR)) { result = result.substring(1); } return result; }  static boolean hasHeaderExtension(@NotNull String filename); @NotNull static String findCommonParentFolder(@NotNull Collection<String> folders); @NotNull static String trimPathSeparators(@NotNull String path); @NotNull static Matcher matchFolderToRegex(@NotNull Pattern pattern, @NotNull File folder); @NotNull
  static final ImmutableSet<String> HEADER_FILE_EXTENSIONS; }
@Test public void testTrimPathSeparator() { assertThat(LexicalIncludePaths.trimPathSeparators("a")).isEqualTo("a"); assertThat(LexicalIncludePaths.trimPathSeparators("/a")).isEqualTo("a"); assertThat(LexicalIncludePaths.trimPathSeparators("a/")).isEqualTo("a"); assertThat(LexicalIncludePaths.trimPathSeparators("/a/")).isEqualTo("a"); }