@Test
public void testGetDifferenceChain() {

    // Setup:
    List<Resource> commitChain = Stream.of(VALUE_FACTORY.createIRI("http://mobi.com/test/commits#test0"),
            VALUE_FACTORY.createIRI("http://mobi.com/test/commits#test1"),
            VALUE_FACTORY.createIRI("http://mobi.com/test/commits#test2"),
            VALUE_FACTORY.createIRI("http://mobi.com/test/commits#test4a"),
            VALUE_FACTORY.createIRI("http://mobi.com/test/commits#test4b"),
            VALUE_FACTORY.createIRI("http://mobi.com/test/commits#test3")).collect(Collectors.toList());
    Resource sourceId = VALUE_FACTORY.createIRI("http://mobi.com/test/commits#test3");
    Resource targetId = VALUE_FACTORY.createIRI("http://mobi.com/test/commits#test0");
    // Expected list should have the first commit removed
    List<Resource> expected = commitChain.subList(1, commitChain.size());
    Collections.reverse(expected);
    try (RepositoryConnection conn = repo.getConnection()) {
        List<Resource> actual = service.getDifferenceChain(sourceId, targetId, conn);
        assertEquals(expected, actual);
    }
}