TypesVocabularyFactory
    >>> from zope.app.schema.vocabulary import IVocabularyFactory
    >>> from zope.component import getUtility
    >>> from plone.app.vocabularies.tests.base import DummyContext
    >>> from plone.app.vocabularies.tests.base import DummyType
    >>> from plone.app.vocabularies.tests.base import DummyTypeTool
    >>> name = 'collective.categorizing.vocabulary.Types'
    >>> util = getUtility(IVocabularyFactory, name)
    >>> context1 = DummyContext()
    >>> context2 = DummyContext()
    >>> context1.context = context2
    >>> util(context1) is None
    True
    >>> tool = DummyTypeTool()
    >>> tool['ATBooleanCriterion'] = DummyType('Boolean Criterion')
    >>> context2.portal_types = tool
    >>> types = util(context1)
    >>> types
    <zope.schema.vocabulary.SimpleVocabulary object at ...>
    >>> len(types.by_token)
    2

    >>> doc = types.by_token['Document']
    >>> doc.title, doc.token, doc.value
    ('Page', 'Document', 'Document')
