public function mock($pattern, $ifNotExist = false)
    {
        if ($ifNotExist) {
            $this->_optionalMockPatterns[] = $pattern;
        } else {
            $this->_mockPatterns[] = $pattern;
        }

        return $this;
    }