### Question:
AnnotatedVelocityToolsScanner extends AbstractVelocityToolsScanner implements ResourceLoaderAware { @Override protected void scan(String[] sources, Map<String, VelocityTool> velocityToolsMap) { for (String basePackage : sources) { Set<BeanDefinition> candidates = provider.findCandidateComponents(basePackage); for (BeanDefinition beanDefinition : candidates) { Class<?> toolClass = resolveToolClass(beanDefinition); DefaultKey defaultKey = findAnnotation(toolClass, DefaultKey.class); String key = defaultKey.value(); String scope = getScope(toolClass); VelocityTool velocityTool = new VelocityTool(new ToolInfo(key, toolClass), scope); velocityToolsMap.put(key, velocityTool); } } } AnnotatedVelocityToolsScanner(); @Override void setResourceLoader(ResourceLoader resourceLoader); @Override void setEnvironment(Environment environment);  }### Answer:
@Test public void testScan() { Map<String, VelocityTool> velocityToolsMap = scanner.scan(); Assert.assertFalse(velocityToolsMap.isEmpty()); }