/**
  * Test for method filterEntityCollection()
  *
  * @magentoDataFixture Magento/Customer/_files/import_export/customers.php
  */
 public function testFilterEntityCollection()
 {
     $createdAtDate = '2038-01-01';
     /** @var $objectManager \Magento\TestFramework\ObjectManager */
     $objectManager = \Magento\TestFramework\Helper\Bootstrap::getObjectManager();
     /**
      * Change created_at date of first customer for future filter test.
      */
     $customers = $objectManager->get('Magento\\Framework\\Registry')->registry('_fixture/Magento_ImportExport_Customer_Collection');
     $customers[0]->setCreatedAt($createdAtDate);
     $customers[0]->save();
     /**
      * Change type of created_at attribute. In this case we have possibility to test date rage filter
      */
     $attributeCollection = \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Model\\Resource\\Attribute\\Collection');
     $attributeCollection->addFieldToFilter('attribute_code', 'created_at');
     /** @var $createdAtAttribute \Magento\Customer\Model\Attribute */
     $createdAtAttribute = $attributeCollection->getFirstItem();
     $createdAtAttribute->setBackendType('datetime');
     $createdAtAttribute->save();
     /**
      * Prepare filter.asd
      */
     $parameters = array(\Magento\ImportExport\Model\Export::FILTER_ELEMENT_GROUP => array('email' => 'example.com', 'created_at' => array($createdAtDate, ''), 'store_id' => \Magento\TestFramework\Helper\Bootstrap::getObjectManager()->get('Magento\\Framework\\StoreManagerInterface')->getStore()->getId()));
     $this->_model->setParameters($parameters);
     /** @var $customers \Magento\Customer\Model\Resource\Customer\Collection */
     $collection = $this->_model->filterEntityCollection(\Magento\TestFramework\Helper\Bootstrap::getObjectManager()->create('Magento\\Customer\\Model\\Resource\\Customer\\Collection'));
     $collection->load();
     $this->assertCount(1, $collection);
     $this->assertEquals($customers[0]->getId(), $collection->getFirstItem()->getId());
 }