public static String removeTrailingSlashes(String path) {
    return TRAILING_SLASH_PATTERN.matcher(path).replaceFirst("");
  }
@Test
  public void removeTrailingSlashes_whenNoTrailingSlashes_returnsOriginal() {
    assertThat(removeTrailingSlashes("/a/b/c")).isEqualTo("/a/b/c");
  }