### Question:
SharedUtil implements Serializable { public static String trimTrailingSlashes(String value) { return value.replaceAll("/*$", ""); }  static boolean equals(Object o1, Object o2); static String trimTrailingSlashes(String value); static String[] splitCamelCase(String camelCaseString); static String camelCaseToHumanFriendly(String camelCaseString); static String join(String[] parts, String separator); static String capitalize(String string); static String propertyIdToHumanFriendly(Object propertyId); static String addGetParameters(String uri, String extraParams); static String dashSeparatedToCamelCase(String dashSeparated); static final String SIZE_PATTERN; }### Answer:
@Test public void trailingSlashIsTrimmed() { assertThat(SharedUtil.trimTrailingSlashes("/path/"), is("/path")); }
@Test public void noTrailingSlashForTrimming() { assertThat(SharedUtil.trimTrailingSlashes("/path"), is("/path")); }
@Test public void trailingSlashesAreTrimmed() { assertThat(SharedUtil.trimTrailingSlashes("/path }
@Test public void emptyStringIsHandled() { assertThat(SharedUtil.trimTrailingSlashes(""), is("")); }
@Test public void rootSlashIsTrimmed() { assertThat(SharedUtil.trimTrailingSlashes("/"), is("")); }