class FacetRegistry {

    <T> T getFacet(@Nullable Class<T> facet) throws IllegalStateException
    {
        T plugin = null;
        if (facet != null)
        {
            List<T> plugins = getFacets(facet);
            if (plugins.size() > 1)
            {
                throw new IllegalStateException(String.format("One implementation was expected for the %s facet, but found: %s", facet.getSimpleName(), plugins.toString()));
            } else if (plugins.size() == 1)
            {
                plugin = plugins.get(0);
            }
        }
        return plugin;
    }

      FacetRegistry(final Collection<Plugin> plugins);

}