@Test public void testBuildAndRegisterCustomCurrency() throws Exception { CurrencyUnit cur = basics.buildAndRegisterCustomCurrency("GeeCOIN", 2014, 0); assertEquals("GeeCOIN", cur.getCurrencyCode()); assertEquals(2014, cur.getNumericCode()); assertEquals(0, cur.getDefaultFractionDigits()); CurrencyUnit unit = Monetary.getCurrency("GeeCOIN"); assertNotNull("Currency not registered.", unit); assertEquals("GeeCOIN", unit.getCurrencyCode()); assertEquals(2014, unit.getNumericCode()); assertEquals(0, unit.getDefaultFractionDigits()); }
public CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits){ throw new UnsupportedOperationException(); }
Basics { public CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits){ throw new UnsupportedOperationException(); } }
Basics { public CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits){ throw new UnsupportedOperationException(); }  }
Basics { public CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits){ throw new UnsupportedOperationException(); }  CurrencyUnit getProvidedCurrency(String currencyCode); CurrencyUnit getProvidedCurrency(Locale locale); CurrencyUnit buildCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits); CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits); Collection<Class<? extends MonetaryAmount>> getMonetaryAmountTypes(); Class<? extends MonetaryAmount> getDefaultMonetaryAmountType(); MonetaryAmountFactory<T> getMoneyFactory(Class<T> moneyType); MonetaryAmount getMoney(Number number, String currencyCode); MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode); MonetaryAmount convertAmount(MonetaryAmount amount, int scale, int precision, MathContext context); MonetaryAmount getMoneyWithContext(Number number, String currencyCode, MonetaryContext context); MonetaryAmount getMoneyWithSpecificCapabilities(Number number, String currencyCode); }
Basics { public CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits){ throw new UnsupportedOperationException(); }  CurrencyUnit getProvidedCurrency(String currencyCode); CurrencyUnit getProvidedCurrency(Locale locale); CurrencyUnit buildCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits); CurrencyUnit buildAndRegisterCustomCurrency(String currencyCode, int numericCode, int defaultFractionUnits); Collection<Class<? extends MonetaryAmount>> getMonetaryAmountTypes(); Class<? extends MonetaryAmount> getDefaultMonetaryAmountType(); MonetaryAmountFactory<T> getMoneyFactory(Class<T> moneyType); MonetaryAmount getMoney(Number number, String currencyCode); MonetaryAmount convertAmount(MonetaryAmount amount, BigDecimal bd, String currencyCode); MonetaryAmount convertAmount(MonetaryAmount amount, int scale, int precision, MathContext context); MonetaryAmount getMoneyWithContext(Number number, String currencyCode, MonetaryContext context); MonetaryAmount getMoneyWithSpecificCapabilities(Number number, String currencyCode);  }