RevCommit head = this.createCommit();
RevCommit head_1 = this.createCommit();
RevCommit head_2 = this.createCommit();
head.getParents()[0] = head_1;
head_1.getParents()[0] = head_2;
AbbreviatedObjectId abbrevId = head.abbreviate(7);
this.repository.headObject = mock(ObjectId.class);
this.repository.commitCache.put(this.repository.headObject, head);
this.repository.revWalk = mock(RevWalk.class);
RevFlag seenFlag = RevFlag.UNINTERESTING;
when(this.repository.revWalk.newFlag("SEEN")).thenReturn(seenFlag);
when(this.repo.getObjectDatabase().newReader().abbreviate(head)).thenReturn(abbrevId);
GitTagDescription description = this.repository.describe();
assertThat(head.has(seenFlag), is(true));
assertThat(head_1.has(seenFlag), is(true));
assertThat(head_2.has(seenFlag), is(true));
assertThat(description.getNextTagName(), is(equalTo("")));
assertThat(description.toString(), is(equalTo(abbrevId.name())));
}