@Test
public void testCreateFileHeader_Delete() throws Exception {
ObjectId adId = blob("a\nd\n");
DiffEntry ent = DiffEntry.delete("FOO", adId);
FileHeader fh = df.toFileHeader(ent);
String diffHeader = "diff --git a/FOO b/FOO\n" //
+ "deleted file mode " + REGULAR_FILE + "\n"
+ "index "
+ adId.abbreviate(8).name()
+ ".."
+ ObjectId.zeroId().abbreviate(8).name() + "\n" //
+ "--- a/FOO\n"//
+ "+++ /dev/null\n";
assertEquals(diffHeader, RawParseUtils.decode(fh.getBuffer()));
assertEquals(0, fh.getStartOffset());
assertEquals(fh.getBuffer().length, fh.getEndOffset());
assertEquals(FileHeader.PatchType.UNIFIED, fh.getPatchType());
assertEquals(1, fh.getHunks().size());
HunkHeader hh = fh.getHunks().get(0);
assertEquals(1, hh.toEditList().size());
EditList el = hh.toEditList();
assertEquals(1, el.size());