### Question:
JodaISO8601UTCCurrentDateAndTimeFormatter implements ISO8601UTCCurrentDateAndTimeFormatter { @Override public String formatToUTC(String day) { StringBuilderWriter b = new StringBuilderWriter(24); try { formatterUTCPrinter.printTo(b,formatterUTC.parseDateTime(day)); } catch (IOException e) { } return b.toString(); }  @Override String getCurrentDay(); @Override String formatToUTC(String day);  }### Answer:
@Test public void testParseDatesToUTCTimeGoesBackADay() { assertEquals("2008-02-06T22:30:00.000Z",formatter.formatToUTC("2008-02-07T09:30:00.000+11:00")); }
@Test public void testParseDatesToUTCTimeGoesBackInCurrentDay() { assertEquals("2008-02-07T00:30:00.000Z",formatter.formatToUTC("2008-02-07T09:30:00.000+09:00")); }
@Test public void testParseDateToUTCTimeGoesBackInCurrentDayWithNoMillis() { assertEquals("2008-02-07T00:30:00.000Z",formatter.formatToUTC("2008-02-07T09:30:00+09:00")); }
@Test public void testParseDateToUTCTimeGoesBackInCurrentDayWithNoSeparators() { assertEquals("2008-02-07T00:30:00.000Z",formatter.formatToUTC("20080207T093000+0900")); }
@Test public void testParseDateToUTCTimeWithNoTimeZoneIsTakenAsUTC() { assertEquals("2008-02-07T09:30:00.000Z",formatter.formatToUTC("20080207T093000+0000")); assertEquals("2008-02-07T09:30:00.000Z",formatter.formatToUTC("2008-02-07T09:30:00")); assertEquals("2008-02-07T09:30:00.000Z",formatter.formatToUTC("2008-02-07T09:30:00+00:00")); assertEquals("2008-02-07T09:30:00.000Z",formatter.formatToUTC("2008-02-07T09:30:00.000+00:00")); assertEquals("2008-02-07T09:30:00.000Z",formatter.formatToUTC("2008-02-07T09:30:00+00:00")); }
@Test public void testParseDateToUTCWithNoTimeInformation() { assertEquals("2008-02-07T00:00:00.000Z",formatter.formatToUTC("2008-02-07")); }