public function testCreate()
 {
     $filterName = 'created_at';
     $config = ['data' => ['config' => ['dataScope' => $filterName, 'label' => __('Label'), 'options' => [['value' => 'Value', 'label' => 'Label']], 'caption' => __('Select...')]], 'context' => $this->context];
     $attributeData = ['attribute_code' => $filterName, 'frontend_input' => 'frontend-input', 'frontend_label' => 'Label', 'backend_type' => 'backend-type', 'options' => [['label' => 'Label', 'value' => 'Value']], 'is_used_in_grid' => true, 'is_visible_in_grid' => true, 'is_filterable_in_grid' => true, 'is_searchable_in_grid' => true];
     $this->componentFactory->expects($this->once())->method('create')->with($filterName, 'filterInput', $config)->willReturn($this->filter);
     $this->assertSame($this->filter, $this->filterFactory->create($attributeData, $this->context));
 }
 public function testPrepare()
 {
     $attributeCode = 'billing_attribute_code';
     $attributeData = ['attribute_code' => $attributeCode, 'frontend_input' => 'frontend-input', 'frontend_label' => 'frontend-label', 'backend_type' => 'backend-type', 'options' => [['label' => 'Label', 'value' => 'Value']], 'is_used_in_grid' => true, 'is_visible_in_grid' => true, 'is_filterable_in_grid' => true, 'is_searchable_in_grid' => true];
     $this->attributeRepository->expects($this->atLeastOnce())->method('getList')->willReturn([$attributeCode => $attributeData]);
     $this->filterFactory->expects($this->once())->method('create')->with($attributeData, $this->context)->willReturn($this->filter);
     $this->filter->expects($this->once())->method('prepare');
     $this->component->prepare();
     $this->assertSame($this->filter, $this->component->getComponent($attributeCode));
 }