DatePrinter { public static String print(Calendar calendar) { return print(calendar.get(Calendar.YEAR), calendar.get(Calendar.MONTH), calendar.get(Calendar.DAY_OF_MONTH)); } private  DatePrinter(); static String print(Calendar calendar); static String print(int year, int month, int dayOfMonth);  }
@Test public void testPrint() throws Exception { assertEquals("21 กันยายน 2531", DatePrinter.print(1988, 8, 21)); assertEquals("20 เมษายน 2511", DatePrinter.print(1968, 3, 20)); }