@Test
public void getBranchWithWrongCatalogTest() {

    // Setup:
    thrown.expect(IllegalArgumentException.class);
    thrown.expectMessage(String.format("Record %s does not belong to Catalog %s", VERSIONED_RDF_RECORD_NO_CATALOG_IRI, CATALOG_IRI));
    try (RepositoryConnection conn = repo.getConnection()) {
        service.getBranch(CATALOG_IRI, VERSIONED_RDF_RECORD_NO_CATALOG_IRI, BRANCH_IRI, branchFactory, conn);
    }
}