### Question:
NamedListWrapper { public BigDecimal getOrDefaultBigDecimalAssertNotNegative(String key, float defaultValue) { BigDecimal bigDecimal = getOrDefaultBigDecimal(key, defaultValue); if (bigDecimal.compareTo(BigDecimal.ZERO) < 0) { throw new IllegalArgumentException(String.format("Property %s is not allowed to be negative", key)); } return bigDecimal; } private  NamedListWrapper(final NamedList namedList, final String exceptionMessage); static NamedListWrapper create(final NamedList namedList, final String exceptionMessage); NamedListWrapper getNamedListOrElseThrow(String key); List<NamedListWrapper> getListOfNamedListsAssertNotEmpty(String key); String getStringOrElseThrow(String key); int getOrDefaultInteger(String key, int defaultValue); BigDecimal getOrDefaultBigDecimalAssertNotNegative(String key, float defaultValue); BigDecimal getOrDefaultBigDecimal(String key, float defaultValue);  }### Answer:
@Test public void testBigDecimalIsNegative() { exceptionRule.expect(IllegalArgumentException.class); exceptionRule.expectMessage(String.format("Property %s is not allowed to be negative", keyBdNegative)); namedListWrapper.getOrDefaultBigDecimalAssertNotNegative(keyBdNegative, 0); }