@Test
public void commitWithInProgressCommitWithRepoConnToOntologyRecordTest() throws Exception {

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