public class ItemFactoryTest {
@Test
public void createNotTaxedAndNotImportedItem() {
Item book = ItemFactory.getItem(ItemType.BOOKS, "Vite da un giorno", 1, false, new BigDecimal("12.49"));
Assert.assertTrue(book instanceof NotTaxedItem);
Assert.assertEquals(ItemType.BOOKS, book.getType());
Assert.assertEquals("Vite da un giorno", book.getName());
Assert.assertEquals(1, book.getQuantity());
Assert.assertEquals(false, book.isImported());
Assert.assertEquals(new BigDecimal("12.49"), book.getPrice());
Assert.assertEquals(new BigDecimal("0"), book.getSalesTaxes());
Assert.assertEquals(Utils.applyRound(new BigDecimal("12.49")), book.getTotalPrice());
book = null;
}