### Question:
MoneyAmountTagValueConverter implements EnrichmentTagValueConverter<MoneyAmountTagValue, MoneyAmount> { @Override public MoneyAmount convert(MoneyAmountTagValue tagValue) { Preconditions.checkNotNull(tagValue); MoneyAmount moneyAmount = new MoneyAmount(); moneyAmount.setAmount(tagValue.getAmount()); moneyAmount.setText(tagValue.getText()); moneyAmount.markGenerated(); return moneyAmount; }  @Override MoneyAmount convert(MoneyAmountTagValue tagValue);  }### Answer:
@Test(expected = NullPointerException.class) public void convert_NULL() { moneyAmountTagValueConverter.convert(null); }
@Test public void convert() { BigDecimal amount = new BigDecimal(1000.01); String amountText = "tysiąc złotych i jeden grosz"; MoneyAmountTagValue moneyAmountTagValue = new MoneyAmountTagValue(); moneyAmountTagValue.setAmount(amount); moneyAmountTagValue.setText(amountText); MoneyAmount moneyAmount = moneyAmountTagValueConverter.convert(moneyAmountTagValue); assertNotNull(moneyAmount); assertEquals(amount, moneyAmount.getAmount()); assertEquals(amountText, moneyAmount.getText()); assertTrue(moneyAmount.isGenerated()); }