protected function hydrateValueObject(&$attributes, $localKey, $valueClass)
    {
        $map = $this->mapper->getManager()->getValueMap($valueClass);

        $embeddedAttributes = $map->getAttributes();

        $valueObject = $this->mapper->getManager()->getValueObjectInstance($valueClass);
        $voWrapper = $this->factory->make($valueObject);

        foreach ($embeddedAttributes as $key) {
            $prefix = snake_case(class_basename($valueClass)).'_';

            $voWrapper->setEntityAttribute($key, $attributes[$prefix.$key]);

            unset($attributes[$prefix.$key]);
        }

        $attributes[$localKey] = $voWrapper->getObject();
    }