@Test
public void testVersionedDistributionPathWithWrongRecord() {

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