/**
  * @dataProvider collectTotalsShippingData
  * @param $shippingCarrierCode
  * @param $shippingMethodCode
  */
 public function testCollectTotalsNoShipping($shippingCarrierCode, $shippingMethodCode)
 {
     $cartId = 123;
     $total = 3322.31;
     $paymentDataMock = $this->getMock('\\Magento\\Quote\\Api\\Data\\PaymentInterface', [], [], '', false);
     $this->shippingMock->expects($this->never())->method('set')->with($cartId, $shippingCarrierCode, $shippingMethodCode);
     $this->paymentMock->expects($this->once())->method('set')->with($cartId, $paymentDataMock);
     $this->cartTotalMock->expects($this->once())->method('get')->with($cartId)->willReturn($total);
     $this->assertEquals($total, $this->model->collectTotals($cartId, $paymentDataMock, $shippingCarrierCode, $shippingMethodCode));
 }
 /**
  * {@inheritDoc}
  */
 public function collectTotals($cartId, \Magento\Quote\Api\Data\PaymentInterface $paymentMethod, $shippingCarrierCode = null, $shippingMethodCode = null, \Magento\Quote\Api\Data\TotalsAdditionalDataInterface $additionalData = null)
 {
     $quoteIdMask = $this->quoteIdMaskFactory->create()->load($cartId, 'masked_id');
     return $this->cartTotalManagement->collectTotals($quoteIdMask->getQuoteId(), $paymentMethod, $shippingCarrierCode, $shippingMethodCode, $additionalData);
 }