// try and merge
MergeResult result = git.merge().include(branchCommit).call();
assertEquals(MergeStatus.CONFLICTING, result.getMergeStatus());
FileTreeIterator iterator = new FileTreeIterator(db);
IndexDiff diff = new IndexDiff(db, Constants.HEAD, iterator);
diff.diff();
assertTrue(diff.getChanged().isEmpty());
assertTrue(diff.getAdded().isEmpty());
assertTrue(diff.getRemoved().isEmpty());
assertTrue(diff.getMissing().isEmpty());
assertTrue(diff.getModified().isEmpty());
assertEquals(1, diff.getConflicting().size());
assertTrue(diff.getConflicting().contains("b"));
assertEquals(StageState.BOTH_ADDED, diff.getConflictingStageStates()
.get("b"));
assertTrue(diff.getUntrackedFolders().isEmpty());
// reset file b to its master state without altering the index
writeTrashFile("b", "second file content - master");
// we should have the same result
iterator = new FileTreeIterator(db);
diff = new IndexDiff(db, Constants.HEAD, iterator);
diff.diff();
assertTrue(diff.getChanged().isEmpty());
assertTrue(diff.getAdded().isEmpty());