@Test
public void getLocationsByPreference_prefers_https_over_rsync() {

    TrustAnchor ta = new TrustAnchor();
    ta.setLocations(Lists.newArrayList("rsync://rpki.ripe.net/ta/ripe-ncc-ta.cer", "https://rpki.ripe.net/ta/ripe-ncc-ta.cer"));
    assertThat(ta.getLocationsByPreference()).containsExactly(
            URI.create("https://rpki.ripe.net/ta/ripe-ncc-ta.cer"),
            URI.create("rsync://rpki.ripe.net/ta/ripe-ncc-ta.cer")
    );
}