test_class.declarator: servletContext
test_class.modifier: private
test_class.original_string: private ServletContext servletContext;
test_class.type: ServletContext
test_class.var_name: servletContext
test_class.file: everrest-core/src/test/java/org/everrest/core/servlet/EverrestInitializedListenerTest.java
test_class.identifier: EverrestInitializedListenerTest
test_case.body: @Test
      public void removesEverrestComponentsFromServletContextAttributeWhenServletContextDestroyed() {
          EverrestInitializedListener everrestInitializedListener = new EverrestInitializedListener();
          ServletContextEvent servletContextEvent = new ServletContextEvent(servletContext);
          everrestInitializedListener.contextDestroyed(servletContextEvent);
  
          verify(servletContext).removeAttribute(eq(EverrestProcessor.class.getName()));
          verify(servletContext).removeAttribute(eq(EverrestConfiguration.class.getName()));
          verify(servletContext).removeAttribute(eq(Application.class.getName()));
          verify(servletContext).removeAttribute(eq(ApplicationProviderBinder.class.getName()));
          verify(servletContext).removeAttribute(eq(ResourceBinder.class.getName()));
          verify(servletContext).removeAttribute(eq(DependencySupplier.class.getName()));
      }
test_case.class_method_signature: EverrestInitializedListenerTest.removesEverrestComponentsFromServletContextAttributeWhenServletContextDestroyed()
test_case.full_signature: @Test public void removesEverrestComponentsFromServletContextAttributeWhenServletContextDestroyed()
test_case.identifier: removesEverrestComponentsFromServletContextAttributeWhenServletContextDestroyed
test_case.invocations: contextDestroyed removeAttribute verify eq getName removeAttribute verify eq getName removeAttribute verify eq getName removeAttribute verify eq getName removeAttribute verify eq getName removeAttribute verify eq getName
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void removesEverrestComponentsFromServletContextAttributeWhenServletContextDestroyed()
focal_class.file: everrest-core/src/main/java/org/everrest/core/servlet/EverrestInitializedListener.java
focal_class.identifier: EverrestInitializedListener
focal_class.interfaces: implements ServletContextListener
focal_class.class_method_signature: EverrestInitializedListener.contextDestroyed(ServletContextEvent sce)
focal_class.full_signature: @Override public void contextDestroyed(ServletContextEvent sce)
focal_class.identifier: contextDestroyed
focal_class.modifiers: @Override public
focal_class.parameters: (ServletContextEvent sce)
focal_class.return: void
focal_class.signature: void contextDestroyed(ServletContextEvent sce)
focal_class.class_method_signature: EverrestInitializedListener.makeFileCollectorDestroyer()
focal_class.full_signature: protected FileCollectorDestroyer makeFileCollectorDestroyer()
focal_class.identifier: makeFileCollectorDestroyer
focal_class.modifiers: protected
focal_class.parameters: ()
focal_class.return: FileCollectorDestroyer
focal_class.signature: FileCollectorDestroyer makeFileCollectorDestroyer()
focal_class.class_method_signature: EverrestInitializedListener.contextInitialized(ServletContextEvent sce)
focal_class.full_signature: @Override public void contextInitialized(ServletContextEvent sce)
focal_class.identifier: contextInitialized
focal_class.modifiers: @Override public
focal_class.parameters: (ServletContextEvent sce)
focal_class.return: void
focal_class.signature: void contextInitialized(ServletContextEvent sce)
focal_class.class_method_signature: EverrestInitializedListener.initializeEverrestComponents(EverrestServletContextInitializer initializer, ServletContext servletContext)
focal_class.full_signature:  void initializeEverrestComponents(EverrestServletContextInitializer initializer, ServletContext servletContext)
focal_class.identifier: initializeEverrestComponents
focal_class.parameters: (EverrestServletContextInitializer initializer, ServletContext servletContext)
focal_class.return: void
focal_class.signature: void initializeEverrestComponents(EverrestServletContextInitializer initializer, ServletContext servletContext)
focal_method.body: @Override
      public void contextDestroyed(ServletContextEvent sce) {
          makeFileCollectorDestroyer().stopFileCollector();
          ServletContext servletContext = sce.getServletContext();
          EverrestProcessor processor = (EverrestProcessor)servletContext.getAttribute(EverrestProcessor.class.getName());
          if (processor != null) {
              processor.stop();
          }
          servletContext.removeAttribute(EverrestProcessor.class.getName());
          servletContext.removeAttribute(EverrestConfiguration.class.getName());
          servletContext.removeAttribute(Application.class.getName());
          servletContext.removeAttribute(DependencySupplier.class.getName());
          servletContext.removeAttribute(ResourceBinder.class.getName());
          servletContext.removeAttribute(ApplicationProviderBinder.class.getName());
      }
focal_method.class_method_signature: EverrestInitializedListener.contextDestroyed(ServletContextEvent sce)
focal_method.full_signature: @Override public void contextDestroyed(ServletContextEvent sce)
focal_method.identifier: contextDestroyed
focal_method.invocations: stopFileCollector makeFileCollectorDestroyer getServletContext getAttribute getName stop removeAttribute getName removeAttribute getName removeAttribute getName removeAttribute getName removeAttribute getName removeAttribute getName
focal_method.modifiers: @Override public
focal_method.parameters: (ServletContextEvent sce)
focal_method.return: void
focal_method.signature: void contextDestroyed(ServletContextEvent sce)