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

  createAndCommitFile("file-m1.xoo", Instant.now().minus(8, ChronoUnit.DAYS));
  createAndCommitFile("file-m2.xoo", Instant.now().minus(7, ChronoUnit.DAYS));
  Instant expectedForkDate = Instant.now().minus(6, ChronoUnit.DAYS);
  createAndCommitFile("file-m3.xoo", expectedForkDate);
  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().forkDate("master", worktree))
    .isEqualTo(expectedForkDate.truncatedTo(ChronoUnit.SECONDS));
}