WebComponentExporterAwareValidator extends AbstractAnnotationValidator implements ClassLoaderAwareServletContainerInitializer { @Override public void process(Set<Class<?>> classSet, ServletContext servletContext) throws ServletException { validateClasses(classSet); }  @Override void process(Set<Class<?>> classSet, ServletContext servletContext); @Override List<Class<?>> getAnnotations();  }
@Test public void process_no_exception_is_thrown_for_correctly_setup_classes() throws ServletException { annotationValidator .process(Stream.of(AbstractMain.class, WCExporter.class) .collect(Collectors.toSet()), servletContext); }
@Test public void process_all_failing_anotations_are_reported() throws ServletException { try { annotationValidator.process( Collections.singleton(ThemeViewportWithParent.class), servletContext); Assert.fail("No exception was thrown for faulty setup."); } catch (InvalidApplicationConfigurationException iace) { String errorMessage = iace.getMessage(); assertHint(errorMessage, Push.class); } }