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 testEncodeUrl() {
      SessionConfiguration sc = new SessionConfiguration();
      sc.setSessionIdName("asession");
      cookieSessionTracking.configure(sc);
      RequestWithSession request = mock(RequestWithSession.class,
          withSettings().extraInterfaces(HttpServletRequest.class));
      RepositoryBackedSession session = mock(RepositoryBackedSession.class);
      when(request.getRepositoryBackedSession(false)).thenReturn(session);
      when(session.isValid()).thenReturn(Boolean.FALSE);
      String url = cookieSessionTracking.encodeUrl(request, "http://www.example.com");
      assertEquals("http://www.example.com", url);
      when(session.isValid()).thenReturn(Boolean.TRUE);
      when(session.getId()).thenReturn("1234");
      url = cookieSessionTracking.encodeUrl(request, "http://www.example.com");
      assertEquals("Session is valid, but URL stames the same", "http://www.example.com", url);
    }
test_case.class_method_signature: TestCookieSessionTracking.testEncodeUrl()
test_case.full_signature: @Test public void testEncodeUrl()
test_case.identifier: testEncodeUrl
test_case.invocations: setSessionIdName configure mock extraInterfaces withSettings mock thenReturn when getRepositoryBackedSession thenReturn when isValid encodeUrl assertEquals thenReturn when isValid thenReturn when getId encodeUrl assertEquals
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void testEncodeUrl()
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: @Override
    public void configure(SessionConfiguration conf) {
      super.configure(conf);
      httpOnly = Boolean.valueOf(conf.getAttribute(COOKIE_HTTP_ONLY_PARAMETER, "true"));
      secure = Boolean.valueOf(conf.getAttribute(SECURE_COOKIE_PARAMETER, "false"));
      secureOnlyOnSecuredRequest = Boolean.valueOf(conf.getAttribute(SECURE_COOKIE_ON_SECURED_REQUEST_PARAMETER, "false"));
      contextPath = conf.getAttribute(COOKIE_CONTEXT_PATH_PARAMETER, null);
    }
focal_method.class_method_signature: CookieSessionTracking.configure(SessionConfiguration conf)
focal_method.full_signature: @Override public void configure(SessionConfiguration conf)
focal_method.identifier: configure
focal_method.invocations: configure valueOf getAttribute valueOf getAttribute valueOf getAttribute getAttribute
focal_method.modifiers: @Override public
focal_method.parameters: (SessionConfiguration conf)
focal_method.return: void
focal_method.signature: void configure(SessionConfiguration conf)