test_class.declarator: COOKIE_PATH_TEST = "cookiePathTest/"
test_class.modifier: private static final
test_class.original_string: private static final String COOKIE_PATH_TEST = "cookiePathTest/";
test_class.type: String
test_class.var_name: COOKIE_PATH_TEST
test_class.declarator: cookieSessionTracking
test_class.modifier: private
test_class.original_string: private CookieSessionTracking cookieSessionTracking;
test_class.type: CookieSessionTracking
test_class.var_name: cookieSessionTracking
test_class.file: session-replacement/src/test/java/com/amadeus/session/servlet/TestCookieSessionTracking.java
test_class.identifier: TestCookieSessionTracking
test_case.body: @Test
    public void testCookiePath() {
      SessionConfiguration sc = new SessionConfiguration();
      sc.setSessionIdName("somesession");
      sc.setAttribute(CookieSessionTracking.COOKIE_CONTEXT_PATH_PARAMETER, COOKIE_PATH_TEST);
      cookieSessionTracking.configure(sc);
      RequestWithSession request = mock(RequestWithSession.class,
                                        withSettings().extraInterfaces(HttpServletRequest.class));
      when(((HttpServletRequest) request).getContextPath()).thenReturn("path");
      RepositoryBackedSession session = mock(RepositoryBackedSession.class);
      when(session.getId()).thenReturn("123");
      when(session.isValid()).thenReturn(true);
      when(request.getRepositoryBackedSession(false)).thenReturn(session);
      HttpServletResponse response = mock(HttpServletResponse.class);
      cookieSessionTracking.propagateSession(request, response);
      ArgumentCaptor<Cookie> cookie = ArgumentCaptor.forClass(Cookie.class);
      verify(response).addCookie(cookie.capture());
      assertEquals("somesession", cookie.getValue().getName());
      assertEquals("123", cookie.getValue().getValue());
      assertEquals(-1, cookie.getValue().getMaxAge());
      assertEquals(COOKIE_PATH_TEST, cookie.getValue().getPath());
    }
test_case.class_method_signature: TestCookieSessionTracking.testCookiePath()
test_case.full_signature: @Test public void testCookiePath()
test_case.identifier: testCookiePath
test_case.invocations: setSessionIdName setAttribute configure mock extraInterfaces withSettings thenReturn when getContextPath mock thenReturn when getId thenReturn when isValid thenReturn when getRepositoryBackedSession mock propagateSession forClass addCookie verify capture assertEquals getName getValue assertEquals getValue getValue assertEquals getMaxAge getValue assertEquals getPath getValue
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testCookiePath()
focal_class.declarator: DEFAULT_CONTEXT_PATH = "/"
focal_class.modifier: static final
focal_class.original_string: static final String DEFAULT_CONTEXT_PATH = "/";
focal_class.type: String
focal_class.var_name: DEFAULT_CONTEXT_PATH
focal_class.declarator: COOKIE_CONTEXT_PATH_PARAMETER = "com.amadeus.session.cookie.contextPath"
focal_class.modifier: static final
focal_class.original_string: static final String COOKIE_CONTEXT_PATH_PARAMETER = "com.amadeus.session.cookie.contextPath";
focal_class.type: String
focal_class.var_name: COOKIE_CONTEXT_PATH_PARAMETER
focal_class.declarator: SECURE_COOKIE_PARAMETER = "com.amadeus.session.cookie.secure"
focal_class.modifier: static final
focal_class.original_string: static final String SECURE_COOKIE_PARAMETER = "com.amadeus.session.cookie.secure";
focal_class.type: String
focal_class.var_name: SECURE_COOKIE_PARAMETER
focal_class.declarator: SECURE_COOKIE_ON_SECURED_REQUEST_PARAMETER = "com.amadeus.session.cookie.secure.on.secured.request"
focal_class.modifier: static final
focal_class.original_string: static final String SECURE_COOKIE_ON_SECURED_REQUEST_PARAMETER = "com.amadeus.session.cookie.secure.on.secured.request";
focal_class.type: String
focal_class.var_name: SECURE_COOKIE_ON_SECURED_REQUEST_PARAMETER
focal_class.declarator: COOKIE_HTTP_ONLY_PARAMETER = "com.amadeus.session.cookie.httpOnly"
focal_class.modifier: static final
focal_class.original_string: static final String COOKIE_HTTP_ONLY_PARAMETER = "com.amadeus.session.cookie.httpOnly";
focal_class.type: String
focal_class.var_name: COOKIE_HTTP_ONLY_PARAMETER
focal_class.declarator: httpOnly = true
focal_class.modifier: private
focal_class.original_string: private boolean httpOnly = true;
focal_class.type: boolean
focal_class.var_name: httpOnly
focal_class.declarator: contextPath
focal_class.modifier: private
focal_class.original_string: private String contextPath;
focal_class.type: String
focal_class.var_name: contextPath
focal_class.declarator: secure
focal_class.modifier: private
focal_class.original_string: private Boolean secure;
focal_class.type: Boolean
focal_class.var_name: secure
focal_class.declarator: secureOnlyOnSecuredRequest
focal_class.modifier: private
focal_class.original_string: private Boolean secureOnlyOnSecuredRequest;
focal_class.type: Boolean
focal_class.var_name: secureOnlyOnSecuredRequest
focal_class.file: session-replacement/src/main/java/com/amadeus/session/servlet/CookieSessionTracking.java
focal_class.identifier: CookieSessionTracking
focal_class.interfaces: implements SessionTracking
focal_class.class_method_signature: CookieSessionTracking.retrieveId(RequestWithSession request)
focal_class.full_signature: @Override public IdAndSource retrieveId(RequestWithSession request)
focal_class.identifier: retrieveId
focal_class.modifiers: @Override public
focal_class.parameters: (RequestWithSession request)
focal_class.return: IdAndSource
focal_class.signature: IdAndSource retrieveId(RequestWithSession request)
focal_class.class_method_signature: CookieSessionTracking.propagateSession(RequestWithSession request, Object response)
focal_class.full_signature: @Override public void propagateSession(RequestWithSession request, Object response)
focal_class.identifier: propagateSession
focal_class.modifiers: @Override public
focal_class.parameters: (RequestWithSession request, Object response)
focal_class.return: void
focal_class.signature: void propagateSession(RequestWithSession request, Object response)
focal_class.class_method_signature: CookieSessionTracking.cookiePath()
focal_class.full_signature: private String cookiePath()
focal_class.identifier: cookiePath
focal_class.modifiers: private
focal_class.parameters: ()
focal_class.return: String
focal_class.signature: String cookiePath()
focal_class.class_method_signature: CookieSessionTracking.configure(SessionConfiguration conf)
focal_class.full_signature: @Override public void configure(SessionConfiguration conf)
focal_class.identifier: configure
focal_class.modifiers: @Override public
focal_class.parameters: (SessionConfiguration conf)
focal_class.return: void
focal_class.signature: void configure(SessionConfiguration conf)
focal_class.class_method_signature: CookieSessionTracking.isCookieTracking()
focal_class.full_signature: @Override public boolean isCookieTracking()
focal_class.identifier: isCookieTracking
focal_class.modifiers: @Override public
focal_class.parameters: ()
focal_class.return: boolean
focal_class.signature: boolean isCookieTracking()
focal_class.superclass: extends BaseSessionTracking
focal_method.body: private String cookiePath() {
      if (contextPath != null) {
        return contextPath;
      }
      return DEFAULT_CONTEXT_PATH;
    }
focal_method.class_method_signature: CookieSessionTracking.cookiePath()
focal_method.full_signature: private String cookiePath()
focal_method.identifier: cookiePath
focal_method.modifiers: private
focal_method.parameters: ()
focal_method.return: String
focal_method.signature: String cookiePath()