public function testDelete()
 {
     $entity = $this->getMockBuilder('Magento\\Sales\\Model\\Order\\Invoice')->disableOriginalConstructor()->getMock();
     $entity->expects($this->once())->method('getEntityId')->willReturn(1);
     $mapper = $this->getMockBuilder('Magento\\Sales\\Model\\ResourceModel\\Order\\Invoice')->disableOriginalConstructor()->getMock();
     $mapper->expects($this->once())->method('delete')->with($entity);
     $this->invoiceMetadata->expects($this->any())->method('getMapper')->willReturn($mapper);
     $this->assertTrue($this->invoice->delete($entity));
 }