XSLTTemplatesContextResolver implements ContextResolver<XSLTTemplatesContextResolver> { public Templates getTemplates(String name) { return templatesMap.get(name); } XSLTTemplatesContextResolver(TemplatesParser templatesParser); @Override XSLTTemplatesContextResolver getContext(Class<?> type); void addAsTemplate(String name, Source source); void addTemplates(String name, Templates templates); void removeTemplates(String name); Templates getTemplates(String name);  }
@Test public void returnsNullIfTemplatesIsNotAvailable() throws Exception { assertNull(xsltTemplatesContextResolver.getTemplates("unavailable")); }