FormatUtil { public static String formatTimestamp(long t) { DateFormat f = DateFormat.getDateTimeInstance(DateFormat.SHORT, DateFormat.SHORT); return f.format(new Date(t)); }  static String formatTimestamp(long t);  }
@Test public void testFormatting() { Date d = new Date(2003, 01, 01, 12, 30); Assert.assertEquals("01.02.03 12:30", FormatUtil.formatTimestamp(d.getTime())); }