Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed()

I’m getting an error Call to undefined method Magento\Customer\Api\Data\CustomerExtension::getIsSubscribed() when running integration tests on my local development environment. For some reason it seems that some extension attributes are not generated. In this case, Magento_Newsletter should add getIsSubscribed() method to CustomerExtension, but the method is missing. Any ideas why this is happening? Log output: Call to…

Extension attribute throws fatal error “Call to undefined method getDummyAttribute() on ProductExtension”

This is how I have implemented extension attribute. I have used \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory in my function to fetch collection. I have created custom data interface named CustomProductInterface to return my custom data. Basically I am not returning \Magento\Catalog\Api\Data\ProductInterface and instead returning my CustomProductInterface. Everything is working fine so far. Now I am creating extension attribute on…