boolean (@NotNull HttpClient client, @NotNull String cookieName) { for (Cookie cookie : client.getState().getCookies()) { if (cookie.getName().equals(cookieName) && !cookie.isExpired()) { return true; } } return false; }