ServerExitRequestHandler implements RequestHandler { @Override public boolean accepts(HttpRequest request) { String path = request.getPath(); return HttpServer.EXIT_URL.equals(path); } ServerExitRequestHandler(HttpServer server); @Override boolean accepts(HttpRequest request); @Override HttpResponse processRequest(HttpRequest request); @Override String toString();  }
@Test public void exitUrl() throws Exception { ServerExitRequestHandler h = getRequestHandlerToTest(); HttpRequest r = new HttpRequest(HttpMethod.GET, HttpServer.EXIT_URL); assertTrue(h.accepts(r)); }