question
stringlengths
935
50.2k
answer
stringlengths
92
8.26k
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.Money' for the exception 'NullP...
```java @Test(expected = NullPointerException.class) public void test_plus_BigDecimal_nullBigDecimal() { GBP_M5_78.plus((BigDecimal) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.Money' for the exception 'Arith...
```java @Test(expected = ArithmeticException.class) public void test_plus_BigDecimalRoundingMode_roundUnecessary() { GBP_2_34.plus(new BigDecimal("1.235"), RoundingMode.UNNECESSARY); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.Money' for the exception 'NullP...
```java @Test(expected = NullPointerException.class) public void test_plus_BigDecimalRoundingMode_nullBigDecimal() { GBP_M5_78.plus((BigDecimal) null, RoundingMode.UNNECESSARY); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.Money' for the exception 'NullP...
```java @Test(expected = NullPointerException.class) public void test_plus_BigDecimalRoundingMode_nullRoundingMode() { GBP_M5_78.plus(BIGDEC_2_34, (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.Money' for the exception 'Arith...
```java @Test(expected = ArithmeticException.class) public void test_plus_double_invalidScale() { GBP_2_34.plus(1.235d); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.Money' for the exception 'Arith...
```java @Test(expected = ArithmeticException.class) public void test_plus_doubleRoundingMode_roundUnecessary() { GBP_2_34.plus(1.235d, RoundingMode.UNNECESSARY); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'plus' in class 'org.joda.money.Money' for the exception 'NullP...
```java @Test(expected = NullPointerException.class) public void test_plus_doubleRoundingMode_nullRoundingMode() { GBP_M5_78.plus(2.34d, (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Curr...
```java @Test(expected = CurrencyMismatchException.class) public void test_minus_Iterable_currencyMismatch() { try { Iterable<Money> iterable = Arrays.asList(GBP_2_33, JPY_423); GBP_M5_78.minus(iterable); } catch (CurrencyMismatchException ex) { assertEquals(GBP, ex.getFirstCurrency()); ...
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_minus_Iterable_nullEntry() { Iterable<Money> iterable = Arrays.asList(GBP_2_33, null); GBP_M5_78.minus(iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_minus_Iterable_nullIterable() { GBP_M5_78.minus((Iterable<Money>) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Curr...
```java @Test(expected = CurrencyMismatchException.class) public void test_minus_Money_currencyMismatch() { try { GBP_M5_78.minus(USD_1_23); } catch (CurrencyMismatchException ex) { assertEquals(GBP, ex.getFirstCurrency()); assertEquals(USD, ex.getSecondCurrency()); throw ex; ...
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_minus_Money_nullMoney() { GBP_M5_78.minus((Money) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Arit...
```java @Test(expected = ArithmeticException.class) public void test_minus_BigDecimal_invalidScale() { GBP_2_34.minus(new BigDecimal("1.235")); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_minus_BigDecimal_nullBigDecimal() { GBP_M5_78.minus((BigDecimal) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Arit...
```java @Test(expected = ArithmeticException.class) public void test_minus_BigDecimalRoundingMode_roundUnecessary() { GBP_2_34.minus(new BigDecimal("1.235"), RoundingMode.UNNECESSARY); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_minus_BigDecimalRoundingMode_nullBigDecimal() { GBP_M5_78.minus((BigDecimal) null, RoundingMode.UNNECESSARY); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_minus_BigDecimalRoundingMode_nullRoundingMode() { GBP_M5_78.minus(BIGDEC_2_34, (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Arit...
```java @Test(expected = ArithmeticException.class) public void test_minus_double_invalidScale() { GBP_2_34.minus(1.235d); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Arit...
```java @Test(expected = ArithmeticException.class) public void test_minus_doubleRoundingMode_roundUnecessary() { GBP_2_34.minus(1.235d, RoundingMode.UNNECESSARY); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'minus' in class 'org.joda.money.Money' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_minus_doubleRoundingMode_nullRoundingMode() { GBP_M5_78.minus(2.34d, (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'multipliedBy' in class 'org.joda.money.Money' for the exceptio...
```java @Test(expected = NullPointerException.class) public void test_multipliedBy_BigDecimalRoundingMode_nullBigDecimal() { GBP_5_78.multipliedBy((BigDecimal) null, RoundingMode.DOWN); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'multipliedBy' in class 'org.joda.money.Money' for the exceptio...
```java @Test(expected = NullPointerException.class) public void test_multipliedBy_BigDecimalRoundingMode_nullRoundingMode() { GBP_5_78.multipliedBy(new BigDecimal("2.5"), (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'multipliedBy' in class 'org.joda.money.Money' for the exceptio...
```java @Test(expected = NullPointerException.class) public void test_multipliedBy_doubleRoundingMode_nullRoundingMode() { GBP_5_78.multipliedBy(2.5d, (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'dividedBy' in class 'org.joda.money.Money' for the exception '...
```java @Test(expected = NullPointerException.class) public void test_dividedBy_BigDecimalRoundingMode_nullBigDecimal() { GBP_5_78.dividedBy((BigDecimal) null, RoundingMode.DOWN); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'dividedBy' in class 'org.joda.money.Money' for the exception '...
```java @Test(expected = NullPointerException.class) public void test_dividedBy_BigDecimalRoundingMode_nullRoundingMode() { GBP_5_78.dividedBy(new BigDecimal("2.5"), (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'dividedBy' in class 'org.joda.money.Money' for the exception '...
```java @Test(expected = NullPointerException.class) public void test_dividedBy_doubleRoundingMode_nullRoundingMode() { GBP_5_78.dividedBy(2.5d, (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.Money' for the exception...
```java @Test(expected = IllegalArgumentException.class) public void test_convertedTo_BigDecimalRoundingMode_negative() { GBP_2_33.convertedTo(EUR, new BigDecimal("-2.5"), RoundingMode.FLOOR); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.Money' for the exception...
```java @Test(expected = IllegalArgumentException.class) public void test_convertedTo_BigDecimalRoundingMode_sameCurrency() { GBP_2_33.convertedTo(GBP, new BigDecimal("2.5"), RoundingMode.DOWN); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.Money' for the exception...
```java @Test(expected = NullPointerException.class) public void test_convertedTo_BigDecimalRoundingMode_nullCurrency() { GBP_5_78.convertedTo((CurrencyUnit) null, new BigDecimal("2"), RoundingMode.DOWN); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.Money' for the exception...
```java @Test(expected = NullPointerException.class) public void test_convertedTo_BigDecimalRoundingMode_nullBigDecimal() { GBP_5_78.convertedTo(EUR, (BigDecimal) null, RoundingMode.DOWN); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'convertedTo' in class 'org.joda.money.Money' for the exception...
```java @Test(expected = NullPointerException.class) public void test_convertedTo_BigDecimalRoundingMode_nullRoundingMode() { GBP_5_78.convertedTo(EUR, new BigDecimal("2.5"), (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'isSameCurrency' in class 'org.joda.money.Money' for the except...
```java @Test(expected = NullPointerException.class) public void test_isSameCurrency_Money_nullMoney() { GBP_2_34.isSameCurrency((Money) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'compareTo' in class 'org.joda.money.Money' for the exception '...
```java @Test(expected = CurrencyMismatchException.class) public void test_compareTo_currenciesDiffer() { Money a = GBP_2_34; Money b = USD_2_35; a.compareTo(b); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'compareTo' in class 'org.joda.money.Money' for the exception '...
```java @Test(expected = ClassCastException.class) @SuppressWarnings({ "unchecked", "rawtypes" }) public void test_compareTo_wrongType() { Comparable a = GBP_2_34; a.compareTo("NotRightType"); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'isEqual' in class 'org.joda.money.Money' for the exception 'Cu...
```java @Test(expected = CurrencyMismatchException.class) public void test_isEqual_currenciesDiffer() { Money a = GBP_2_34; Money b = USD_2_35; a.isEqual(b); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'isGreaterThan' in class 'org.joda.money.Money' for the excepti...
```java @Test(expected = CurrencyMismatchException.class) public void test_isGreaterThan_currenciesDiffer() { Money a = GBP_2_34; Money b = USD_2_35; a.isGreaterThan(b); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'isLessThan' in class 'org.joda.money.Money' for the exception ...
```java @Test(expected = CurrencyMismatchException.class) public void test_isLessThan_currenciesDiffer() { Money a = GBP_2_34; Money b = USD_2_35; a.isLessThan(b); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'max' in class 'org.joda.money.MoneyUtils' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_max_differentCurrencies() { MoneyUtils.max(GBP_20, EUR_30); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'min' in class 'org.joda.money.MoneyUtils' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_min_differentCurrencies() { MoneyUtils.min(GBP_20, EUR_30); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'add' in class 'org.joda.money.MoneyUtils' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_add_differentCurrencies() { MoneyUtils.add(GBP_20, EUR_30); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'subtract' in class 'org.joda.money.MoneyUtils' for the excepti...
```java @Test(expected = CurrencyMismatchException.class) public void test_subtract_differentCurrencies() { MoneyUtils.subtract(GBP_20, EUR_30); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.BigMoney' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_factory_of_Currency_BigDecimal_nullCurrency() { BigMoney.of((CurrencyUnit) null, BIGDEC_2_345); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.BigMoney' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_factory_of_Currency_BigDecimal_nullBigDecimal() { BigMoney.of(GBP, (BigDecimal) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.BigMoney' for the exception 'Ille...
```java @Test(expected = IllegalArgumentException.class) public void test_factory_of_Currency_subClass1() { class BadDecimal extends BigDecimal { private static final long serialVersionUID = 1L; BadDecimal() { super(432); } @Override public BigInteger unscaledV...
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.BigMoney' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_factory_of_Currency_double_nullCurrency() { BigMoney.of((CurrencyUnit) null, 2.345d); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofScale' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = ArithmeticException.class) public void test_factory_ofScale_Currency_BigDecimal_invalidScale() { BigMoney.ofScale(GBP, BIGDEC_2_345, 2); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofScale' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = NullPointerException.class) public void test_factory_ofScale_Currency_BigDecimal_nullCurrency() { BigMoney.ofScale((CurrencyUnit) null, BIGDEC_2_34, 2); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofScale' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = NullPointerException.class) public void test_factory_ofScale_Currency_BigDecimal_nullBigDecimal() { BigMoney.ofScale(GBP, (BigDecimal) null, 2); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofScale' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = ArithmeticException.class) public void test_factory_ofScale_Currency_BigDecimal_int_RoundingMode_UNNECESSARY() { BigMoney.ofScale(JPY, BIGDEC_2_34, 1, RoundingMode.UNNECESSARY); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofScale' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = NullPointerException.class) public void test_factory_ofScale_Currency_BigDecimal_int_RoundingMode_nullCurrency() { BigMoney.ofScale((CurrencyUnit) null, BIGDEC_2_34, 2, RoundingMode.DOWN); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofScale' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = NullPointerException.class) public void test_factory_ofScale_Currency_BigDecimal_int_RoundingMode_nullBigDecimal() { BigMoney.ofScale(GBP, (BigDecimal) null, 2, RoundingMode.DOWN); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofScale' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = NullPointerException.class) public void test_factory_ofScale_Currency_BigDecimal_int_RoundingMode_nullRoundingMode() { BigMoney.ofScale(GBP, BIGDEC_2_34, 2, (RoundingMode) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofScale' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = NullPointerException.class) public void test_factory_ofScale_Currency_long_int_nullCurrency() { BigMoney.ofScale((CurrencyUnit) null, 234, 2); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofMajor' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = NullPointerException.class) public void test_factory_ofMajor_Currency_long_nullCurrency() { BigMoney.ofMajor((CurrencyUnit) null, 234); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'ofMinor' in class 'org.joda.money.BigMoney' for the exception ...
```java @Test(expected = NullPointerException.class) public void test_factory_ofMinor_Currency_long_nullCurrency() { BigMoney.ofMinor((CurrencyUnit) null, 234); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'zero' in class 'org.joda.money.BigMoney' for the exception 'Nu...
```java @Test(expected = NullPointerException.class) public void test_factory_zero_Currency_nullCurrency() { BigMoney.zero((CurrencyUnit) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'zero' in class 'org.joda.money.BigMoney' for the exception 'Nu...
```java @Test(expected = NullPointerException.class) public void test_factory_zero_Currency_int_nullCurrency() { BigMoney.zero((CurrencyUnit) null, 3); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.BigMoney' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_factory_from_BigMoneyProvider_nullBigMoneyProvider() { BigMoney.of((BigMoneyProvider) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'of' in class 'org.joda.money.BigMoney' for the exception 'Null...
```java @Test(expected = NullPointerException.class) public void test_factory_from_BigMoneyProvider_badProvider() { BigMoney.of(BAD_PROVIDER); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'I...
```java @Test(expected = IllegalArgumentException.class) public void test_factory_total_varargs_empty() { BigMoney.total(); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'I...
```java @Test(expected = IllegalArgumentException.class) public void test_factory_total_array_empty() { BigMoneyProvider[] array = new BigMoneyProvider[0]; BigMoney.total(array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_varargs_currenciesDiffer() { BigMoney.total(GBP_2_33, JPY_423); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_array_currenciesDiffer() { BigMoneyProvider[] array = new BigMoneyProvider[] { GBP_2_33, JPY_423 }; BigMoney.total(array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_varargs_nullFirst() { BigMoney.total((BigMoney) null, GBP_2_33, GBP_2_36); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_array_nullFirst() { BigMoneyProvider[] array = new BigMoneyProvider[] { null, GBP_2_33, GBP_2_36 }; BigMoney.total(array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_varargs_nullNotFirst() { BigMoney.total(GBP_2_33, null, GBP_2_36); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_array_nullNotFirst() { BigMoneyProvider[] array = new BigMoneyProvider[] { GBP_2_33, null, GBP_2_36 }; BigMoney.total(array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_varargs_badProvider() { BigMoney.total(BAD_PROVIDER); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_array_badProvider() { BigMoneyProvider[] array = new BigMoneyProvider[] { BAD_PROVIDER }; BigMoney.total(array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'I...
```java @Test(expected = IllegalArgumentException.class) public void test_factory_total_Iterable_empty() { Iterable<BigMoney> iterable = Collections.emptyList(); BigMoney.total(iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_Iterable_currenciesDiffer() { Iterable<BigMoney> iterable = Arrays.asList(GBP_2_33, JPY_423); BigMoney.total(iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_Iterable_nullFirst() { Iterable<BigMoney> iterable = Arrays.asList(null, GBP_2_33, GBP_2_36); BigMoney.total(iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_Iterable_nullNotFirst() { Iterable<BigMoney> iterable = Arrays.asList(GBP_2_33, null, GBP_2_36); BigMoney.total(iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_Iterable_badProvider() { Iterable<BigMoneyProvider> iterable = Arrays.<BigMoneyProvider>asList(BAD_PROVIDER); BigMoney.total(iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_CurrencyUnitVarargs_currenciesDiffer() { BigMoney.total(GBP, JPY_423); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_CurrencyUnitArray_currenciesDiffer() { BigMoney[] array = new BigMoney[] { JPY_423 }; BigMoney.total(GBP, array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_CurrencyUnitVarargs_currenciesDifferInArray() { BigMoney.total(GBP, GBP_2_33, JPY_423); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_CurrencyUnitArray_currenciesDifferInArray() { BigMoney[] array = new BigMoney[] { GBP_2_33, JPY_423 }; BigMoney.total(GBP, array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitVarargs_nullFirst() { BigMoney.total(GBP, null, GBP_2_33, GBP_2_36); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitArray_nullFirst() { BigMoney[] array = new BigMoney[] { null, GBP_2_33, GBP_2_36 }; BigMoney.total(GBP, array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitVarargs_nullNotFirst() { BigMoney.total(GBP, GBP_2_33, null, GBP_2_36); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitArray_nullNotFirst() { BigMoney[] array = new BigMoney[] { GBP_2_33, null, GBP_2_36 }; BigMoney.total(GBP, array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitVarargs_badProvider() { BigMoney.total(GBP, BAD_PROVIDER); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitArray_badProvider() { BigMoneyProvider[] array = new BigMoneyProvider[] { BAD_PROVIDER }; BigMoney.total(GBP, array); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_CurrencyUnitIterable_currenciesDiffer() { Iterable<BigMoney> iterable = Arrays.asList(JPY_423); BigMoney.total(GBP, iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'C...
```java @Test(expected = CurrencyMismatchException.class) public void test_factory_total_CurrencyUnitIterable_currenciesDifferInIterable() { Iterable<BigMoney> iterable = Arrays.asList(GBP_2_33, JPY_423); BigMoney.total(GBP, iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitIterable_nullFirst() { Iterable<BigMoney> iterable = Arrays.asList(null, GBP_2_33, GBP_2_36); BigMoney.total(GBP, iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitIterable_nullNotFirst() { Iterable<BigMoney> iterable = Arrays.asList(GBP_2_33, null, GBP_2_36); BigMoney.total(GBP, iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'total' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_total_CurrencyUnitIterable_badProvider() { Iterable<BigMoneyProvider> iterable = Arrays.<BigMoneyProvider>asList(BAD_PROVIDER); BigMoney.total(GBP, iterable); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'parse' in class 'org.joda.money.BigMoney' for the exception 'I...
```java @Test(expected = IllegalArgumentException.class) public void test_factory_parse_String_tooShort() { BigMoney.parse("GBP"); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'parse' in class 'org.joda.money.BigMoney' for the exception 'I...
```java @Test(expected = IllegalArgumentException.class) public void test_factory_parse_String_exponent() { BigMoney.parse("GBP 234E2"); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'parse' in class 'org.joda.money.BigMoney' for the exception 'I...
```java @Test(expected = IllegalArgumentException.class) public void test_factory_parse_String_badCurrency() { BigMoney.parse("GBX 2.34"); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'parse' in class 'org.joda.money.BigMoney' for the exception 'N...
```java @Test(expected = NullPointerException.class) public void test_factory_parse_String_nullString() { BigMoney.parse((String) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'org.joda.money.BigMoney' for the exception '...
```java @Test(expected = InvocationTargetException.class) public void test_constructor_null1() throws Exception { Constructor<BigMoney> con = BigMoney.class.getDeclaredConstructor(CurrencyUnit.class, BigDecimal.class); assertEquals(false, Modifier.isPublic(con.getModifiers())); assertEquals(false, Modifier....
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method '<init>' in class 'org.joda.money.BigMoney' for the exception '...
```java @Test(expected = InvocationTargetException.class) public void test_constructor_null2() throws Exception { Constructor<BigMoney> con = BigMoney.class.getDeclaredConstructor(CurrencyUnit.class, BigDecimal.class); con.setAccessible(true); con.newInstance(new Object[] { GBP, null }); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'readExternal' in class 'org.joda.money.Ser' for the exception ...
```java @Test(expected = InvalidObjectException.class) public void test_serialization_invalidNumericCode() throws Exception { CurrencyUnit cu = new CurrencyUnit("GBP", (short) 234, (short) 2); BigMoney m = BigMoney.of(cu, 123.43d); ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (ObjectOut...
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'readExternal' in class 'org.joda.money.Ser' for the exception ...
```java @Test(expected = InvalidObjectException.class) public void test_serialization_invalidDecimalPlaces() throws Exception { CurrencyUnit cu = new CurrencyUnit("GBP", (short) 826, (short) 1); BigMoney m = BigMoney.of(cu, 123.43d); ByteArrayOutputStream baos = new ByteArrayOutputStream(); try (ObjectO...
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'withCurrencyUnit' in class 'org.joda.money.BigMoney' for the e...
```java @Test(expected = NullPointerException.class) public void test_withCurrencyUnit_Currency_nullCurrency() { GBP_2_34.withCurrencyUnit((CurrencyUnit) null); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'withScale' in class 'org.joda.money.BigMoney' for the exceptio...
```java @Test(expected = ArithmeticException.class) public void test_withScale_int_less() { BigMoney.parse("GBP 2.345").withScale(2); } ``` </s>
<s>[INST] <<SYS>> You are a helpful programming assistant and an expert Java programmer. You are helping a user writing exceptional-behavior tests for their Java code. <</SYS>> Please complete an exceptional behavior test method in Java to test the method 'withCurrencyScale' in class 'org.joda.money.BigMoney' for the ...
```java @Test(expected = ArithmeticException.class) public void test_withCurrencyScale_int_less() { BigMoney.parse("GBP 2.345").withCurrencyScale(); } ``` </s>