### Question:
BigDecimalTypeConverter implements TypeConverter { @Override public BigDecimal fromString(Type ignored, String value) { try { return StringTypeConverter.NULL_LITERAL.equals(value) || value == null ? null : new BigDecimal(value); } catch (NumberFormatException e) { throw new IllegalArgumentException("Unable convert to a BigDecimal: " + value, e); } }  @Override boolean isApplicable(Type type); @Override BigDecimal fromString(Type ignored, String value); @Override String toString(Type ignored, Object value);  }### Answer:
@Test void shouldThrowExceptionWhenConvertingFromMalformedString() { String toConvert = "malformed string"; assertThatThrownBy(() -> typeConverter.fromString(null, toConvert)) .isExactlyInstanceOf(IllegalArgumentException.class); }