Revision implements Serializable, Comparable<Revision> { public static Revision createHeadRevision(final long revision) { return new Revision(revision, null, true); } private  Revision(final long revisionNumber, final Date revisionDate, final boolean headRevision); static Revision create(final long revision); static Revision createHeadRevision(final long revision); static Revision create(final Date revision); static Revision create(final Date revision, final long revisionNumber); static Revision parse(final String text); long getNumber(); Date getDate(); @Override int compareTo(Revision o); boolean isHeadRevision(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static final Revision FIRST; static final Revision UNDEFINED; static final Revision HEAD; }
@Test public void testCreateHeadRevision() { final Revision revision = Revision.createHeadRevision(42); assertEquals("HEAD", revision.toString()); }