### Question:
RequestPredicate { public RequestPredicate containsCookie(final String name) { return containsCookie(name, (c) -> true); } private  RequestPredicate(); private  RequestPredicate(final RequestPredicate first,
            final Condition cond); ConditionalHandler thenApply(final Handler handler); boolean test(final ServerRequest request); RequestPredicate and(final Predicate<ServerRequest> predicate); RequestPredicate or(final Predicate<ServerRequest> predicate); RequestPredicate negate(); RequestPredicate isOfMethod(final String... methods); RequestPredicate isOfMethod(final Method... methods); RequestPredicate containsHeader(final String name); RequestPredicate containsHeader(final String name,
            final String value); RequestPredicate containsHeader(final String name,
            final Predicate<String> predicate); RequestPredicate containsQueryParameter(final String name); RequestPredicate containsQueryParameter(final String name,
            final String value); RequestPredicate containsQueryParameter(final String name,
            final Predicate<String> predicate); RequestPredicate containsCookie(final String name); RequestPredicate containsCookie(final String name,
            final String value); RequestPredicate containsCookie(final String name,
            final Predicate<String> predicate); RequestPredicate accepts(final String... contentType); RequestPredicate accepts(final MediaType... contentType); RequestPredicate hasContentType(final String... contentType); RequestPredicate hasContentType(final MediaType... contentType); static RequestPredicate create();  }### Answer:
@Test public void containsCookie() { final RoutingChecker checker = new RoutingChecker(); Routing routing = Routing.builder() .get("/exists", RequestPredicate.create() .containsCookie("my-cookie") .thenApply((req, resp) -> { checker.handlerInvoked("cookieFound"); }).otherwise((req, res) -> { checker.handlerInvoked("cookieNotFound"); })) .build(); assertThrows(NullPointerException.class, () -> { RequestPredicate.create() .containsCookie(null); }); routing.route(mockRequest("/exists", Map.of("cookie", List.of("my-cookie=abc"))), mockResponse()); assertThat(checker.handlersInvoked(), is("cookieFound")); checker.reset(); routing.route(mockRequest("/exists", Map.of("cookie", List.of("other-cookie=abc"))), mockResponse()); assertThat(checker.handlersInvoked(), is("cookieNotFound")); }