public static CookieBuilder newCookieBuilder(HttpRequest request) {
    return new CookieBuilder(request);
  }
@Test
  public void create_not_secured_cookie_when_header_is_not_http() {
    when(request.getHeader(HTTPS_HEADER)).thenReturn("http");
    Cookie cookie = newCookieBuilder(request).setName("name").setValue("value").setHttpOnly(true).setExpiry(10).build();
    assertThat(cookie.isSecure()).isFalse();
  }