assertEquals("2008-03-01Z", JodaConvert.serializeUTCDateMidnight(new DateMidnight(2008, 3, 1, DateTimeZone.UTC)));
}
public void testDeserializeLocalTime() throws JiBXException {
assertNull("Null input", JodaConvert.deserializeLocalTime(null));
LocalTime time = JodaConvert.deserializeLocalTime("01:02:03Z");
assertEquals("Wrong value", 1, time.getHourOfDay());
assertEquals("Wrong value", 2, time.getMinuteOfHour());
assertEquals("Wrong value", 3, time.getSecondOfMinute());
time = JodaConvert.deserializeLocalTime("02:05:06.123-02:00");
assertEquals("Wrong value", 2, time.getHourOfDay());
assertEquals("Wrong value", 5, time.getMinuteOfHour());
assertEquals("Wrong value", 6, time.getSecondOfMinute());
assertEquals("Wrong value", 123, time.getMillisOfSecond());
time = JodaConvert.deserializeLocalTime("02:05:06.123");
assertEquals("Wrong value", 2, time.getHourOfDay());
assertEquals("Wrong value", 5, time.getMinuteOfHour());
assertEquals("Wrong value", 6, time.getSecondOfMinute());
assertEquals("Wrong value", 123, time.getMillisOfSecond());
time = JodaConvert.deserializeLocalTime("24:00:00");
assertEquals("Wrong value", 0, time.getHourOfDay());
assertEquals("Wrong value", 0, time.getMinuteOfHour());
assertEquals("Wrong value", 0, time.getSecondOfMinute());
try {
JodaConvert.deserializeLocalTime("24:05:06.123-02:00");
fail("Invalid hour number");
} catch (JiBXException ex) {}
try {