format.applyPattern("{0, date, short}");
assertTrue("Wrong short date format", format.getFormats()[0]
.equals(DateFormat.getDateInstance(DateFormat.SHORT)));
assertEquals("Wrong short date pattern",
"{0,date,short}", format.toPattern());
format.applyPattern("{0, date, medium}");
assertTrue("Wrong medium date format", format.getFormats()[0]
.equals(DateFormat.getDateInstance(DateFormat.MEDIUM)));
assertEquals("Wrong medium date pattern",
"{0,date}", format.toPattern());
format.applyPattern("{0, date, long}");