@Test
public void testGetCookieValue() {

    HttpServletRequest httpServletRequest = Mockito.mock(HttpServletRequest.class);
    Mockito.when(httpServletRequest.getCookies()).thenReturn(null);
    assertNull(Http.getCookieValue(httpServletRequest, "cookie1"));
    assertNull(Http.getCookieValue(httpServletRequest, "cookie2"));
    javax.servlet.http.Cookie[] cookies = new javax.servlet.http.Cookie[2];
    cookies[0] = new javax.servlet.http.Cookie("cookie1", "value1");
    cookies[1] = new javax.servlet.http.Cookie("cookie2", "value2");
    Mockito.when(httpServletRequest.getCookies()).thenReturn(cookies);
    assertEquals(Http.getCookieValue(httpServletRequest, "cookie1"), "value1");
    assertEquals(Http.getCookieValue(httpServletRequest, "cookie2"), "value2");
    assertNull(Http.getCookieValue(httpServletRequest, "cookie3"));
}