RenderFilter cacheFilter = (RenderFilter) SpringContextSingleton.getInstance().getContext().getBean("cacheFilter");
ModuleCacheProvider moduleCacheProvider = (ModuleCacheProvider) SpringContextSingleton.getInstance().getContext().getBean("ModuleCacheProvider");
CacheKeyGenerator generator = moduleCacheProvider.getKeyGenerator();
final String key = (String) generator.generate(resource, context);
RenderChain chain = new RenderChain(attributesFilter, cacheFilter, outFilter);
String result = chain.doFilter(context, resource);
final Element element = moduleCacheProvider.getCache().get(key);
final Element element1 = moduleCacheProvider.getDependenciesCache().get(node.getPath());
assertNotNull("Node /shared should have dependencies",element1);
assertTrue("Dependencies must not be empty",((Set<String>) element1.getValue()).size()>0);