public function getBehavior($behavior, $config = array())
    {
        $identifier = $behavior;
        if (! ($behavior instanceof AnServiceIdentifier)) {
            //Create the complete identifier if a partial identifier was passed
           if (is_string($behavior) && strpos($behavior, '.') === false) {
               $identifier = clone $this->getIdentifier();
               $identifier->path = array($identifier->path[0], 'behavior');
               $identifier->name = $behavior;
           } else {
               $identifier = $this->getIdentifier($behavior);
           }
        }

        if (! isset($this->_behaviors[$identifier->name])) {
            $config['mixer'] = $this->getMixer();
            $behavior = $this->getService($identifier, $config);

           //Check the behavior interface
           if (! ($behavior instanceof AnBehaviorInterface)) {
               throw new AnBehaviorException("Behavior $identifier does not implement AnBehaviorInterface");
           }
        } else {
            $behavior = $this->_behaviors[$identifier->name];
        }

        return $behavior;
    }