@Test
public void commitWithInProgressCommitWithRepoConnToVersionedRDFRecordTest() throws Exception {

    Resource result = manager.commit(CATALOG_IRI, record.getResource(), targetBranch.getResource(), user, "Message", repo.getConnection());
    assertEquals(commit.getResource(), result);
    verify(catalogUtils).getRecord(eq(CATALOG_IRI), eq(record.getResource()), eq(versionedRDFRecordFactory), any(RepositoryConnection.class));
    verify(baseService).getTargetBranch(eq(record), eq(targetBranch.getResource()), any(RepositoryConnection.class));
    verify(baseService).getBranchHeadCommit(eq(targetBranch), any(RepositoryConnection.class));
    verify(baseService).getInProgressCommit(eq(record.getResource()), eq(user), any(RepositoryConnection.class));
    verify(baseService).createCommit(inProgressCommit, "Message", commit, null);
    verify(baseService).addCommit(eq(targetBranch), eq(commit), any(RepositoryConnection.class));
    verify(baseService).removeInProgressCommit(eq(inProgressCommit), any(RepositoryConnection.class));
}