ModuleDataExtractor { public LinkedListX getRestResources(ApplicationContext rootContext){ List resources = new ArrayList<>(); module.getRestResourceClasses().forEach(it -> resources.addAll(rootContext.getBeansOfType(it).values())); module.getRestAnnotationClasses().forEach(it -> resources.addAll(rootContext.getBeansWithAnnotation(it).values())); rootContext.getBeansWithAnnotation(JaxRsResource.class).forEach((n,it)->resources.add(it)); rootContext.getBeansOfType(JaxRsResourceWrapper.class).forEach((n,it)->resources.add(it.getResource())); resources.addAll(module.getJaxRsResourceObjects()); return LinkedListX.fromIterable(resources); }  LinkedListX getRestResources(ApplicationContext rootContext); List<FilterData> createFilteredDataList(ServerData data); List<ServletData> createServletDataList(ServerData data);  }
@Test public void testGetRestResources() { extractor.getRestResources(rootContext); verify(rootContext,times(1)).getBeansOfType(ModuleDataExtractorTest.class); }