protected function setupTaxDetails(array $taxDetails)
 {
     $taxDetailsMock = $this->getMockBuilder('\\Magento\\Tax\\Api\\Data\\GrandTotalDetailsInterface')->getMock();
     $this->detailsFactoryMock->expects($this->once())->method('create')->willReturn($taxDetailsMock);
     $taxDetailsMock->expects($this->once())->method('setAmount')->with($taxDetails['amount'])->willReturnSelf();
     $taxDetailsMock->expects($this->once())->method('setRates')->with($taxDetails['rates'])->willReturnSelf();
     $taxDetailsMock->expects($this->once())->method('setGroupId')->with(1)->willReturnSelf();
     return $taxDetailsMock;
 }