test_class.file: session-replacement/src/test/java/com/amadeus/session/servlet/TestInitializeSessionManagement.java
test_class.identifier: TestInitializeSessionManagement
test_case.body: @Test
    public void testDefault() throws ServletException {
      InitializeSessionManagement ism = new InitializeSessionManagement();
      Set<Class<?>> classes = Collections.emptySet();
      ServletContext context = mock(ServletContext.class);
      Dynamic dynamic = mock(Dynamic.class);
      when(context.addFilter(any(String.class), any(Filter.class))).thenReturn(dynamic);
      when(context.getClassLoader()).thenReturn(this.getClass().getClassLoader());
      ism.onStartup(classes, context);
      verify(context).addFilter(eq("com.amdeus.session.filter"), any(SessionFilter.class));
    }
test_case.class_method_signature: TestInitializeSessionManagement.testDefault()
test_case.full_signature: @Test public void testDefault()
test_case.identifier: testDefault
test_case.invocations: emptySet mock mock thenReturn when addFilter any any thenReturn when getClassLoader getClassLoader getClass onStartup addFilter verify eq any
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testDefault()
focal_class.declarator: logger = LoggerFactory.getLogger(InitializeSessionManagement.class)
focal_class.modifier: private static final
focal_class.original_string: private static final Logger logger = LoggerFactory.getLogger(InitializeSessionManagement.class);
focal_class.type: Logger
focal_class.var_name: logger
focal_class.declarator: disabled = Boolean.parseBoolean(getPropertySecured(DISABLED_SESSION, null))
focal_class.modifier: private static
focal_class.original_string: private static boolean disabled = Boolean.parseBoolean(getPropertySecured(DISABLED_SESSION, null));
focal_class.type: boolean
focal_class.var_name: disabled
focal_class.file: session-replacement/src/main/java/com/amadeus/session/servlet/InitializeSessionManagement.java
focal_class.identifier: InitializeSessionManagement
focal_class.interfaces: implements ServletContainerInitializer
focal_class.class_method_signature: InitializeSessionManagement.onStartup(Set<Class<?>> classes, ServletContext context)
focal_class.full_signature: @Override public void onStartup(Set<Class<?>> classes, ServletContext context)
focal_class.identifier: onStartup
focal_class.modifiers: @Override public
focal_class.parameters: (Set<Class<?>> classes, ServletContext context)
focal_class.return: void
focal_class.signature: void onStartup(Set<Class<?>> classes, ServletContext context)
focal_class.class_method_signature: InitializeSessionManagement.setupProviders(ServletContext context)
focal_class.full_signature: static void setupProviders(ServletContext context)
focal_class.identifier: setupProviders
focal_class.modifiers: static
focal_class.parameters: (ServletContext context)
focal_class.return: void
focal_class.signature: void setupProviders(ServletContext context)
focal_method.body: @Override
    public void onStartup(Set<Class<?>> classes, ServletContext context) throws ServletException {
      // If session support is disabled, just log it
      if (disabled || Boolean.parseBoolean(context.getInitParameter(DISABLED_SESSION))) {
        logger.warn("Session management disabled for {}, {}, {}", context.getContextPath(), disabled,
            context.getInitParameter(DISABLED_SESSION));
        return;
      }
      setupProviders(context);
      initSessionManagement(context);
    }
focal_method.class_method_signature: InitializeSessionManagement.onStartup(Set<Class<?>> classes, ServletContext context)
focal_method.full_signature: @Override public void onStartup(Set<Class<?>> classes, ServletContext context)
focal_method.identifier: onStartup
focal_method.invocations: parseBoolean getInitParameter warn getContextPath getInitParameter setupProviders initSessionManagement
focal_method.modifiers: @Override public
focal_method.parameters: (Set<Class<?>> classes, ServletContext context)
focal_method.return: void
focal_method.signature: void onStartup(Set<Class<?>> classes, ServletContext context)