public void testCompareTo() {
        Single test1 = new Single(21);
        Single test2 = new Single(22);
        Single test3 = new Single(23);
        assertEquals(true, test1.compareTo(test1) == 0);
        assertEquals(true, test1.compareTo(test2) < 0);
        assertEquals(true, test1.compareTo(test3) < 0);
        assertEquals(true, test2.compareTo(test1) > 0);
        assertEquals(true, test2.compareTo(test2) == 0);
        assertEquals(true, test2.compareTo(test3) < 0);
        assertEquals(true, test3.compareTo(test1) > 0);
        assertEquals(true, test3.compareTo(test2) > 0);
        assertEquals(true, test3.compareTo(test3) == 0);
        
//        try {
//            test1.compareTo("Hello");
//            fail();
//        } catch (ClassCastException ex) {
//            // expected
//        }
//        try {
//            test1.compareTo(new Period(0, 0, 0, 21, 0, 0, 0, 0, PeriodType.days()));
//            fail();
//        } catch (ClassCastException ex) {
//            // expected
//        }
        try {
            test1.compareTo(null);
            fail();
        } catch (NullPointerException ex) {
            // expected
        }
    }