/** Test that comparator is defined. */ public static void testGetComparator() throws Exception { assert (WritableComparator.get(Frob.class) instanceof FrobComparator); }
static { // register this comparator WritableComparator.define(NullWritable.class, new Comparator()); }
static { // register default comparator WritableComparator.define(Frob.class, new FrobComparator()); }