@Test
public void testParseYearDateTime() throws Exception {

    // xs:gYear
    for (int i = 0; i < 10; i++) {
        String year = "20" + getRandom(1, 0) + getRandom(9, 0);
        String hour = getRandom(1, 0) + "" + getRandom(9, 0);
        String minutes = getRandom(5, 1) + "" + getRandom(9, 0);
        // Format: yyyy-hh:mm Time zone
        String jodaISODate = ISODate.parseISODateTime(year + "-" + hour + ":" + minutes + "Z");
        assertEquals(jodaISODate, year + "-01-01T" + hour + ":" + minutes + ":00.000Z");
        year = "20" + getRandom(1, 0) + getRandom(9, 0);
        // Format: yyyy
        jodaISODate = ISODate.parseISODateTime(year);
        assertEquals(jodaISODate, year + "-01-01T00:00:00.000Z");
    }
}