class WorkItemDefinitionRegistries {

    public WorkItemDefinitionCacheRegistry put(final T item,
                                               final WorkItemDefinitionCacheRegistry registry) {
        registryMap.put(keyProvider.apply(item),
                        registry);
        return registry;
    }

    public  WorkItemDefinitionRegistries(final Function<T, String> keyProvider,
                                        final Map<String, WorkItemDefinitionCacheRegistry> registryMap,
                                        final Consumer<WorkItemDefinitionCacheRegistry> registryDestroyer);

}