Hi Lance, I think this test exactly reflects the tested assertion which is:
An event with qualifier @Initialized(ApplicationScoped.class) is fired when the application context is initialized and an event with qualifier @Destroyed(ApplicationScoped.class) is fired when the application is destroyed. The event payload is the ServletContext if the application is a web application deployed to a Servlet container
So I would say that any lazy initialization is not doable here. Isn't the cause something others? Because it looks like one observer was notified or what is the content of collector.getContextPaths() at line 90 in the test?
|