assertEquals("Wrong time pattern", "{0,time}", format.toPattern());
format.applyPattern("{0,Time, Short\n}");
assertTrue("Wrong short time format", format.getFormats()[0]
.equals(DateFormat.getTimeInstance(DateFormat.SHORT)));
assertEquals("Wrong short time pattern",
"{0,time,short}", format.toPattern());
format.applyPattern("{0,TIME,\nmedium }");
assertTrue("Wrong medium time format", format.getFormats()[0]
.equals(DateFormat.getTimeInstance(DateFormat.MEDIUM)));
assertEquals("Wrong medium time pattern",
"{0,time}", format.toPattern());