}
@Test
public void testKeepDeleteConflict() throws IOException {
Assume.assumeTrue(isGraftSupported());
BaseRepository repo = getTestRepository();
writeFile("file", "");
Changeset base = commit();
writeFile("file", "X");
Changeset changed = commit();
update(base);
RemoveCommand.on(repo).execute("file");
Changeset removed = commit();
GraftContext ctx = GraftCommand.on(repo).execute(changed);
Assert.assertNotNull(ctx);
Assert.assertTrue(ctx.getFlagConflicts().isEmpty());
Assert.assertTrue(ctx.getMergeConflicts().isEmpty());
KeepDeleteConflict kdc = Utils.single(ctx.getKeepDeleteConflicts());
Assert.assertNotNull(kdc);
Assert.assertSame(removed, repo.tip());
Assert.assertEquals("file", kdc.getFilename());
Assert.assertSame(changed, ctx.getSource());
kdc.delete();
// TODO commiting results in an error, see issue 3261
// Changeset cs = ctx.commit();