### Question:
SyntaxType implements Comparable<SyntaxType> { @Override public int compareTo(SyntaxType syntaxType) { return new CompareToBuilder().append(getName(), syntaxType.getName()).toComparison(); } SyntaxType(String id, String name); static Map<String, SyntaxType> getSyntaxTypes(); String getId(); String getName(); @Override String toString(); @Override int hashCode(); @Override boolean equals(Object object); @Override int compareTo(SyntaxType syntaxType); static final SyntaxType XWIKI; static final SyntaxType CONFLUENCE; static final SyntaxType CONFLUENCEXHTML; static final SyntaxType MEDIAWIKI; static final SyntaxType DOKUWIKI; static final SyntaxType CREOLE; static final SyntaxType JSPWIKI; static final SyntaxType TWIKI; static final SyntaxType XHTML; static final SyntaxType ANNOTATED_XHTML; static final SyntaxType ANNOTATED_HTML; static final SyntaxType HTML; static final SyntaxType PLAIN; static final SyntaxType EVENT; static final SyntaxType TEX; static final SyntaxType DOCBOOK; static final SyntaxType XDOMXML; static final SyntaxType MARKDOWN; static final SyntaxType APT; }### Answer:
@Test public void comparisons() { SyntaxType syntaxType1 = new SyntaxType("mytype1", "BBB"); SyntaxType syntaxType2 = new SyntaxType("mytype1", "AAA"); assertEquals(0, syntaxType1.compareTo(syntaxType1)); assertTrue(syntaxType1.compareTo(syntaxType2) > 0); }