String filePath = "file.txt";
IFile file = testUtils.addFileToProject(project.getProject(), filePath, "some text");
Repository repo = testRepository.getRepository();
DirCache index = repo.lockDirCache();
DirCacheBuilder builder = index.builder();
addUnmergedEntry(filePath, builder);
builder.commit();
try {
file.move(new Path("destination.txt"), false, null);