@Test public void testApplyPromotion_noDiscountsApplied() { // setup Transaction transaction = TransactionTestUtils.createTransaction( toothBrush, milkCarton, toothBrush, chips, toothBrush, toothBrush, toothBrush); // test promotionElement.applyPromotion(transaction); // verify List<TransactionItem> brushes = Lists.newArrayList(transaction.getItemMap().get(toothBrush)); assertDiscountApplied("brush 1", brushes.get(0), true, noDiscount); assertDiscountApplied("brush 2", brushes.get(1), true, noDiscount); assertDiscountApplied("brush 3", brushes.get(2), true, freeDiscount); assertDiscountApplied("brush 4", brushes.get(3), false, null); assertDiscountApplied("brush 5", brushes.get(4), false, null); }