public function testSetNameThrowsException() { $product = $this->dummyData->getProduct(); $this->productQuantityDiscount = new ProductQuantityDiscount($product); $this->setExpectedException(BadMethodCallException::class, 'Unable to set name'); $this->productQuantityDiscount->setName('test'); }