port = PortProber.findFreePort();
File htdocs = FileUtils.toFile(getClass().getResource("/htdocs"));
server = WebServers.createWebServer(port)
.add("/form_posted\\.html", new FormPosted())
.add(new StaticFileHandler(htdocs))
.add("/basic", new BasicAuthenticationHandler(new InMemoryPasswords().add("user", "pass")))
.add("/redirect", new RedirectHandler("http://" + getServerNameString() + "/index.html"))
.add("/basic/redirect", new RedirectHandler("http://" + getServerNameString() + "/basic/index.html"));
try {
server.start().get();
} catch (InterruptedException e) {