@Test public void simplifyPathShoudReturnSimplifiedDirectory() { String actual = SimpleUrl.simplifyPath("../foo/../bar/./baz"); assertThat(actual).isEqualTo("../bar/baz"); }
@VisibleForTesting static String simplifyPath(String path) { String simplified = Files.simplifyPath(path); if (CURRENT_PATH.equals(simplified)) { return ""; } return simplified; }
SimpleUrl { @VisibleForTesting static String simplifyPath(String path) { String simplified = Files.simplifyPath(path); if (CURRENT_PATH.equals(simplified)) { return ""; } return simplified; } }
SimpleUrl { @VisibleForTesting static String simplifyPath(String path) { String simplified = Files.simplifyPath(path); if (CURRENT_PATH.equals(simplified)) { return ""; } return simplified; } SimpleUrl(String url); }
SimpleUrl { @VisibleForTesting static String simplifyPath(String path) { String simplified = Files.simplifyPath(path); if (CURRENT_PATH.equals(simplified)) { return ""; } return simplified; } SimpleUrl(String url); String getUrl(); String getSimplified(); }
SimpleUrl { @VisibleForTesting static String simplifyPath(String path) { String simplified = Files.simplifyPath(path); if (CURRENT_PATH.equals(simplified)) { return ""; } return simplified; } SimpleUrl(String url); String getUrl(); String getSimplified();  }