Rsync { public static List<URI> generateCandidateParentUris(URI uri) { URI candidate = uri.normalize(); if (!candidate.getPath().endsWith("/")) { candidate = URI.create(uri.toASCIIString() + "/"); } final List<URI> result = new ArrayList<>(); while (!"/".equals(candidate.getPath())) { candidate = candidate.resolve(".."); result.add(candidate); } return result; } private  Rsync(); static File localFileFromRsyncUri(File localRsyncDirectory, URI rsyncUri); static List<URI> generateCandidateParentUris(URI uri);  }
@Test public void should_generate_candidate_parent_rsync_uris() { assertThat(generateCandidateParentUris(URI.create("rsync: assertThat(generateCandidateParentUris(URI.create("rsync: assertThat(generateCandidateParentUris(URI.create("rsync: URI.create("rsync: ); assertThat(generateCandidateParentUris(URI.create("rsync: URI.create("rsync: ); assertThat(generateCandidateParentUris(URI.create("rsync: URI.create("rsync: URI.create("rsync: ); assertThat(generateCandidateParentUris(URI.create("rsync: URI.create("rsync: URI.create("rsync: ); }