@@ -0,0 +1,1409 @@
+package de.fhhannover.inform.iron.mapserver.utils;%0A%0Aimport java.text.ParseException;%0Aimport java.text.SimpleDateFormat;%0Aimport java.util.Date;%0A%0Aimport static org.junit.Assert.*;%0A%0Aimport org.junit.Test;%0A%0Apublic class Iso8601DateTimeTest %7B%0A%0A%09private static SimpleDateFormat formatter =%0A%09%09%09new SimpleDateFormat(%22yyyy-MM-dd'T'HH:mm:ss.SSSZ%22);%0A%09private static SimpleDateFormat formatterNoMilliseconds =%0A%09%09%09new SimpleDateFormat(%22yyyy-MM-dd'T'HH:mm:ssZ%22);%0A%0A%09/**%0A%09 * Parse the given string according to the date%0A%09 * format %22yyyy-MM-dd'T'HH:mm:ss.SSSZ%22.%0A%09 *%0A%09 * @param dateString the string to parse%0A%09 * @return the date object%0A%09 */%0A%09private static Date parseDate(String dateString) %7B%0A%09%09try %7B%0A%09%09%09return formatter.parse(dateString);%0A%09%09%7D catch (ParseException e) %7B%0A%09%09%09throw new RuntimeException(e);%0A%09%09%7D%0A%09%7D%0A%0A%09@Test%0A%09public void testFormatMilliseconds() %7B%0A%09%09Date d = parseDate(%222014-07-15T22:22:22.123+0200%22);%0A%09%09assertEquals(%22123%22, Iso8601DateTime.formatMilliseconds(d));%0A%09%7D%0A%0A%09@Test%0A%09public void testFormatMillisecondsWithZero() %7B%0A%09%09Date d = parseDate(%222014-07-15T22:22:22.0+0200%22);%0A%09%09assertEquals(%220%22, Iso8601DateTime.formatMilliseconds(d));%0A%09%7D%0A%0A%09@Test%0A%09public void testFormatMillisecondsNoMilliseconds() %7B%0A%09%09try %7B%0A%09%09%09Date d = formatterNoMilliseconds.parse(%222014-07-15T22:22:22+0200%22);%0A%09%09%09assertEquals(%220%22, Iso8601DateTime.formatMilliseconds(d));%0A%09%09%7D catch (ParseException e) %7B%0A%09%09%09throw new RuntimeException(e);%0A%09%09%7D%0A%09%7D%0A%7D%0A

add simple test for Iso8601DateTimeTest.formatMilliseconds