format.applyPattern("{0, number, currency}");
assertTrue("Wrong currency number format", format.getFormats()[0]
.equals(NumberFormat.getCurrencyInstance()));
assertEquals("Wrong currency number pattern",
"{0,number,currency}", format.toPattern());
format.applyPattern("{0, number, percent}");
assertTrue("Wrong percent number format", format.getFormats()[0]
.equals(NumberFormat.getPercentInstance()));
assertEquals("Wrong percent number pattern",
"{0,number,percent}", format.toPattern());
format.applyPattern("{0, number, integer}");