### Question:
PriceUtils { public static MonetaryAmount calculateNetPrice(final MonetaryAmount amount, final TaxRate taxRate) { return taxRate.isIncludedInPrice() ? convertGrossToNetPrice(amount, taxRate.getAmount()) : amount; } private  PriceUtils(); static MonetaryAmount zeroAmount(final CurrencyUnit currency); static MonetaryAmount calculateAppliedTaxes(final TaxedItemPrice taxedPrice); static MonetaryAmount calculateGrossPrice(final MonetaryAmount amount, final TaxRate taxRate); static MonetaryAmount calculateNetPrice(final MonetaryAmount amount, final TaxRate taxRate); static MonetaryAmount convertNetToGrossPrice(final MonetaryAmount netAmount, final double taxRate); static MonetaryAmount convertGrossToNetPrice(final MonetaryAmount grossAmount, final double taxRate);  }### Answer:
@Test public void calculatesNetWhenTaxesIncluded() throws Exception { final TaxRate taxRate = taxRateOf(0.19, true); final MonetaryAmount amount = monetaryAmountOf(119); assertThat(calculateNetPrice(amount, taxRate)).isEqualTo(monetaryAmountOf(100)); }
@Test public void calculatesNetWhenTaxesNotIncluded() throws Exception { final TaxRate taxRate = taxRateOf(0.19, false); final MonetaryAmount amount = monetaryAmountOf(119); assertThat(calculateNetPrice(amount, taxRate)).isEqualTo(monetaryAmountOf(119)); }