@Test
void testProcess() throws Exception {

    DefaultWebApplicationServer server = new DefaultWebApplicationServer();
    HttpServer httpServer = new DefaultHttpServer(8180, server, false);
    DefaultWebApplication application = new DefaultWebApplication();
    application.setContextPath("/context");
    application.addServlet("snoop", new TestSnoopServlet());
    application.addServletMapping("snoop", "/snoop/*");
    server.addWebApplication(application);
    server.initialize();
    server.start();
    httpServer.start();
    try {
        HttpClient client = HttpClient.newHttpClient();
        HttpRequest request = HttpRequest.newBuilder(new URI("http://localhost:8180/context/snoop/index.html")).build();
        HttpResponse<Void> response = client.send(request, HttpResponse.BodyHandlers.discarding());
        assertEquals(200, response.statusCode());
    } catch (IOException ioe) {
        throw new RuntimeException(ioe);
    }
    httpServer.stop();
    server.stop();
}