public function testOptionalAttributes()
{
$this->productMock->shouldReceive('getAttribute')->with('optional_attributes')->andReturn(['name' => 'value', 'boosted_name' => ['boost' => 0.1, 'value' => 'boosted_value']])->byDefault();
$expected = ['name' => ['boost' => 1, 'value' => 'value'], 'boosted_name' => ['boost' => 0.1, 'value' => 'boosted_value']];
$this->assertEquals($expected, $this->config->optionalAttributes($this->productMock));
$this->productMock->shouldReceive('getAttribute')->with('optional_attributes')->andReturn([0 => 'value', 1 => ['boost' => 0.1, 'value' => 'boosted_value']])->byDefault();
$expected = ['optional_attributes_0' => ['boost' => 1, 'value' => 'value'], 'optional_attributes_1' => ['boost' => 0.1, 'value' => 'boosted_value']];
$this->assertEquals($expected, $this->config->optionalAttributes($this->productMock));
$this->dummyMock->shouldReceive('getAttribute')->with('custom_optional_attributes')->andReturn(['name' => 'value', 'boosted_name' => ['boost' => 0.1, 'value' => 'boosted_value']])->byDefault();
$expected = ['name' => ['boost' => 1, 'value' => 'value'], 'boosted_name' => ['boost' => 0.1, 'value' => 'boosted_value']];
$this->assertEquals($expected, $this->config->optionalAttributes($this->dummyMock));
$this->dummyMock->shouldReceive('getAttribute')->with('custom_optional_attributes')->andReturn([0 => 'value', 1 => ['boost' => 0.1, 'value' => 'boosted_value']])->byDefault();
$expected = ['custom_optional_attributes_0' => ['boost' => 1, 'value' => 'value'], 'custom_optional_attributes_1' => ['boost' => 0.1, 'value' => 'boosted_value']];
$this->assertEquals($expected, $this->config->optionalAttributes($this->dummyMock));
}