@Test
public void getVersionedDistributionWithWrongVersionTest() {

    // Setup:
    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage(String.format("Distribution %s does not belong to Version %s", LONE_DISTRIBUTION_IRI, VERSION_IRI));
    try (RepositoryConnection conn = repo.getConnection()) {
        service.getVersionedDistribution(CATALOG_IRI, VERSIONED_RECORD_IRI, VERSION_IRI, LONE_DISTRIBUTION_IRI, conn);
    }
}