public function testSetCustomAttributes() { $customerAttributes = ['warehouse_zip' => [AttributeValue::ATTRIBUTE_CODE => 'warehouse_zip', AttributeValue::VALUE => '78777'], 'warehouse_alternate' => [AttributeValue::ATTRIBUTE_CODE => 'warehouse_alternate', AttributeValue::VALUE => '90051']]; $attributeValue1 = $this->_valueBuilder->populateWithArray($customerAttributes['warehouse_zip'])->create(); $attributeValue2 = $this->_valueBuilder->populateWithArray($customerAttributes['warehouse_alternate'])->create(); $address = $this->_customerBuilder->setCustomAttributes([$attributeValue1, $attributeValue2])->create(); $this->assertEquals('78777', $address->getCustomAttribute('warehouse_zip')->getValue()); $this->assertEquals('90051', $address->getCustomAttribute('warehouse_alternate')->getValue()); $this->assertEquals($customerAttributes, $address->__toArray()[Customer::CUSTOM_ATTRIBUTES_KEY]); }