public function load($resource, $type = null)
    {
        $repository = $this->delegatingLoader->load($resource, $type);
        
        if(!$repository instanceof ConfigRepositoryInterface)
        {
            throw new \UnexpectedValueException('The loader must return a repository instance');
        }
        
        return $repository;
    }