test_class.file: cosmic-common/src/test/java/com/cloud/utils/HttpUtilsTest.java
test_class.identifier: HttpUtilsTest
test_case.body: @Test
      public void findCookieTest() {
          Cookie[] cookies = null;
          String cookieName = null;
  
          // null test
          assertNull(HttpUtils.findCookie(cookies, cookieName));
          cookieName = "";
          assertNull(HttpUtils.findCookie(cookies, cookieName));
  
          // value test
          cookieName = "daakuBandar";
          cookies = new Cookie[]{new Cookie(cookieName, "someValue")};
          assertNull(HttpUtils.findCookie(cookies, "aalasiLangur"));
          assertNotNull(HttpUtils.findCookie(cookies, cookieName));
      }
test_case.class_method_signature: HttpUtilsTest.findCookieTest()
test_case.full_signature: @Test public void findCookieTest()
test_case.identifier: findCookieTest
test_case.invocations: assertNull findCookie assertNull findCookie assertNull findCookie assertNotNull findCookie
test_case.modifiers: @Test public
test_case.parameters: ()
test_case.return: void
test_case.signature: void findCookieTest()
focal_class.declarator: s_logger = LoggerFactory.getLogger(HttpUtils.class)
focal_class.modifier: public static final
focal_class.original_string: public static final Logger s_logger = LoggerFactory.getLogger(HttpUtils.class);
focal_class.type: Logger
focal_class.var_name: s_logger
focal_class.declarator: UTF_8 = "UTF-8"
focal_class.modifier: public static final
focal_class.original_string: public static final String UTF_8 = "UTF-8";
focal_class.type: String
focal_class.var_name: UTF_8
focal_class.declarator: RESPONSE_TYPE_JSON = "json"
focal_class.modifier: public static final
focal_class.original_string: public static final String RESPONSE_TYPE_JSON = "json";
focal_class.type: String
focal_class.var_name: RESPONSE_TYPE_JSON
focal_class.declarator: RESPONSE_TYPE_XML = "xml"
focal_class.modifier: public static final
focal_class.original_string: public static final String RESPONSE_TYPE_XML = "xml";
focal_class.type: String
focal_class.var_name: RESPONSE_TYPE_XML
focal_class.declarator: JSON_CONTENT_TYPE = "application/json; charset=UTF-8"
focal_class.modifier: public static final
focal_class.original_string: public static final String JSON_CONTENT_TYPE = "application/json; charset=UTF-8";
focal_class.type: String
focal_class.var_name: JSON_CONTENT_TYPE
focal_class.declarator: XML_CONTENT_TYPE = "text/xml; charset=UTF-8"
focal_class.modifier: public static final
focal_class.original_string: public static final String XML_CONTENT_TYPE = "text/xml; charset=UTF-8";
focal_class.type: String
focal_class.var_name: XML_CONTENT_TYPE
focal_class.file: cosmic-common/src/main/java/com/cloud/utils/HttpUtils.java
focal_class.identifier: HttpUtils
focal_class.class_method_signature: HttpUtils.writeHttpResponse(final HttpServletResponse resp, final String response,
                                           final Integer responseCode, final String responseType, final String jsonContentType)
focal_class.full_signature: public static void writeHttpResponse(final HttpServletResponse resp, final String response,
                                           final Integer responseCode, final String responseType, final String jsonContentType)
focal_class.identifier: writeHttpResponse
focal_class.modifiers: public static
focal_class.parameters: (final HttpServletResponse resp, final String response,
                                           final Integer responseCode, final String responseType, final String jsonContentType)
focal_class.return: void
focal_class.signature: void writeHttpResponse(final HttpServletResponse resp, final String response,
                                           final Integer responseCode, final String responseType, final String jsonContentType)
focal_class.class_method_signature: HttpUtils.addSecurityHeaders(final HttpServletResponse resp)
focal_class.full_signature: public static void addSecurityHeaders(final HttpServletResponse resp)
focal_class.identifier: addSecurityHeaders
focal_class.modifiers: public static
focal_class.parameters: (final HttpServletResponse resp)
focal_class.return: void
focal_class.signature: void addSecurityHeaders(final HttpServletResponse resp)
focal_class.class_method_signature: HttpUtils.validateSessionKey(final HttpSession session, final Map<String, Object[]> params, final Cookie[] cookies, final String sessionKeyString)
focal_class.full_signature: public static boolean validateSessionKey(final HttpSession session, final Map<String, Object[]> params, final Cookie[] cookies, final String sessionKeyString)
focal_class.identifier: validateSessionKey
focal_class.modifiers: public static
focal_class.parameters: (final HttpSession session, final Map<String, Object[]> params, final Cookie[] cookies, final String sessionKeyString)
focal_class.return: boolean
focal_class.signature: boolean validateSessionKey(final HttpSession session, final Map<String, Object[]> params, final Cookie[] cookies, final String sessionKeyString)
focal_class.class_method_signature: HttpUtils.findCookie(final Cookie[] cookies, final String key)
focal_class.full_signature: public static String findCookie(final Cookie[] cookies, final String key)
focal_class.identifier: findCookie
focal_class.modifiers: public static
focal_class.parameters: (final Cookie[] cookies, final String key)
focal_class.return: String
focal_class.signature: String findCookie(final Cookie[] cookies, final String key)
focal_method.body: public static String findCookie(final Cookie[] cookies, final String key) {
          if (cookies == null || key == null || key.isEmpty()) {
              return null;
          }
          for (final Cookie cookie : cookies) {
              if (cookie != null && cookie.getName().equals(key)) {
                  return cookie.getValue();
              }
          }
          return null;
      }
focal_method.class_method_signature: HttpUtils.findCookie(final Cookie[] cookies, final String key)
focal_method.full_signature: public static String findCookie(final Cookie[] cookies, final String key)
focal_method.identifier: findCookie
focal_method.invocations: isEmpty equals getName getValue
focal_method.modifiers: public static
focal_method.parameters: (final Cookie[] cookies, final String key)
focal_method.return: String
focal_method.signature: String findCookie(final Cookie[] cookies, final String key)