protected function applyRule($item, $rule)
 {
     $qty = 2;
     $discountCalc = $this->getMock('Magento\\SalesRule\\Model\\Rule\\Action\\Discount', ['fixQuantity', 'calculate'], [], '', false);
     $discountData = $this->getMock('Magento\\SalesRule\\Model\\Rule\\Action\\Discount\\Data', [], ['amount' => 30, 'baseAmount' => 30, 'originalAmount' => 30, 'baseOriginalAmount' => 30], '', false);
     $this->validatorUtility->expects($this->any())->method('getItemQty')->with($this->anything(), $this->anything())->will($this->returnValue($qty));
     $discountCalc->expects($this->any())->method('fixQuantity')->with($this->equalTo($qty), $this->equalTo($rule))->will($this->returnValue($qty));
     $discountCalc->expects($this->any())->method('calculate')->with($this->equalTo($rule), $this->equalTo($item), $this->equalTo($qty))->will($this->returnValue($discountData));
     $this->calculatorFactory->expects($this->any())->method('create')->with($this->anything())->will($this->returnValue($discountCalc));
 }