### Question:
Ref implements Comparable<Ref> { @Override public int compareTo(Ref o) { return name.compareTo(o.getName()); } Ref(final String name, final ObjectId oid); String getName(); String localName(); static String localName(final String ref); String namespace(); static String namespace(final String ref); ObjectId getObjectId(); @Override boolean equals(Object o); @Override int hashCode(); @Override int compareTo(Ref o); @Override String toString(); static String append(String namespace, String child); static String child(String namespace, String ref); static final String MASTER; static final String HEAD; static final String STAGE_HEAD; static final String WORK_HEAD; static final String MERGE_HEAD; static final String CHERRY_PICK_HEAD; static final String ORIG_HEAD; static final String REFS_PREFIX; static final String REMOTES_PREFIX; static final String TAGS_PREFIX; static final String HEADS_PREFIX; static final String TRANSACTIONS_PREFIX; static final String ORIGIN; }### Answer:
@Test public void testCompare() throws Exception { insertAndAdd(points1); RevCommit oid = geogig.command(CommitOp.class).call(); Ref testRef = new Ref(Ref.REFS_PREFIX + "commit1", oid.getId()); insertAndAdd(lines1); RevCommit oid2 = geogig.command(CommitOp.class).call(); Ref testRef2 = new Ref(Ref.REFS_PREFIX + "commit2", oid2.getId()); assertTrue(testRef.compareTo(testRef2) < 0); assertTrue(testRef2.compareTo(testRef) > 0); assertEquals(0, testRef.compareTo(testRef)); }