@Test
public void branchChangedFiles_from_diverged() throws IOException, GitAPIException {

  createAndCommitFile("file-m1.xoo");
  createAndCommitFile("file-m2.xoo");
  createAndCommitFile("file-m3.xoo");
  ObjectId forkPoint = git.getRepository().exactRef("HEAD").getObjectId();
  appendToAndCommitFile("file-m3.xoo");
  createAndCommitFile("file-m4.xoo");
  git.branchCreate().setName("b1").setStartPoint(forkPoint.getName()).call();
  git.checkout().setName("b1").call();
  createAndCommitFile("file-b1.xoo");
  appendToAndCommitFile("file-m1.xoo");
  deleteAndCommitFile("file-m2.xoo");
  assertThat(newScmProvider().branchChangedFiles("master", worktree))
    .containsExactlyInAnyOrder(
      worktree.resolve("file-b1.xoo"),
      worktree.resolve("file-m1.xoo"));
}