df.setCurrency(null);
fail("Expected NullPointerException");
} catch (NullPointerException e) {
}
Currency currency = Currency.getInstance("AED");
df.setCurrency(currency);
assertTrue("Returned incorrect currency", currency == df.getCurrency());
assertTrue("Returned incorrect currency symbol", currency.getSymbol(
locale)
.equals(df.getDecimalFormatSymbols().getCurrencySymbol()));
assertTrue("Returned incorrect international currency symbol", currency
.getCurrencyCode().equals(
df.getDecimalFormatSymbols()
.getInternationalCurrencySymbol()));
}