@Test
public void testGetCommit() throws Exception {

    // Setup:
    Resource commitId = VALUE_FACTORY.createIRI(COMMITS + "test0");
    Commit commit = commitFactory.createNew(commitId);
    doReturn(Optional.of(commit)).when(utilsService).optObject(eq(commitId), eq(commitFactory), any(RepositoryConnection.class));
    Optional<Commit> result = manager.getCommit(commitId);
    verify(utilsService).optObject(eq(commitId), eq(commitFactory), any(RepositoryConnection.class));
    assertTrue(result.isPresent());
    assertEquals(commit, result.get());
}