protected function getHandler()
    {
        $handler = resolve($this->type->handler);
        if (!$handler instanceof ContentTypeHandler) {
            throw new DomainException("Type: $this->type can't be handled");
        }
        return $handler;
    }