@Test
public void testBranchPathWithWrongRecord() {

    // Setup:
    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage(String.format("Branch %s does not belong to VersionedRDFRecord %s", LONE_BRANCH_IRI, VERSIONED_RDF_RECORD_IRI));
    try (RepositoryConnection conn = repo.getConnection()) {
        service.validateBranch(CATALOG_IRI, VERSIONED_RDF_RECORD_IRI, LONE_BRANCH_IRI, conn);
    }
}