ParseDateFormat { String format(Date date) { synchronized (lock) { return dateFormat.format(date); } } private  ParseDateFormat(); static ParseDateFormat getInstance();  }
@Test public void testFormat() { Date date = new Date(1431515281123L); String string = ParseDateFormat.getInstance().format(date); assertEquals("2015-05-13T11:08:01.123Z", string); }