@Test
public void should_generate_candidate_parent_rsync_uris() {

    assertThat(generateCandidateParentUris(URI.create("rsync://hostname"))).isEmpty();
    assertThat(generateCandidateParentUris(URI.create("rsync://hostname/"))).isEmpty();
    assertThat(generateCandidateParentUris(URI.create("rsync://hostname/repo"))).containsExactlyInAnyOrder(
        URI.create("rsync://hostname/")
    );
    assertThat(generateCandidateParentUris(URI.create("rsync://hostname/repo/"))).containsExactlyInAnyOrder(
        URI.create("rsync://hostname/")
    );
    assertThat(generateCandidateParentUris(URI.create("rsync://hostname/repo/child"))).containsExactlyInAnyOrder(
        URI.create("rsync://hostname/repo/"),
        URI.create("rsync://hostname/")
    );
    assertThat(generateCandidateParentUris(URI.create("rsync://hostname/repo/child/"))).containsExactlyInAnyOrder(
        URI.create("rsync://hostname/repo/"),
        URI.create("rsync://hostname/")
    );
}