@Test
public void testAddVersionedRDFRecord() throws Exception {

    // Setup:
    VersionedRDFRecord record = versionedRDFRecordFactory.createNew(NEW_IRI);
    record.setProperty(USER_IRI, VALUE_FACTORY.createIRI(_Thing.publisher_IRI));
    manager.addRecord(distributedCatalogId, record);
    verify(utilsService).getObject(eq(distributedCatalogId), eq(catalogFactory), any(RepositoryConnection.class));
    verify(utilsService).updateObject(eq(record), any(RepositoryConnection.class));
    verify(utilsService, times(0)).addObject(eq(record), any(RepositoryConnection.class));
    verify(utilsService).addObject(any(Branch.class), any(RepositoryConnection.class));
    assertTrue(record.getCatalog_resource().isPresent());
    assertEquals(distributedCatalogId, record.getCatalog_resource().get());
    assertTrue(record.getMasterBranch_resource().isPresent());
    assertEquals(1, record.getBranch_resource().size());
}