@BeforeClass(alwaysRun=true)
public void setUp() throws Exception {
utils = ResourceUtils.create(this, "mycontext");
server = new TestHttpServer()
.interceptor(new ResponseServer())
.interceptor(new ResponseBasicUnauthorized())
.interceptor(new RequestBasicAuth())
.handler("/simple", new TestHttpRequestHandler().response("OK"))
.handler("/empty", new TestHttpRequestHandler().code(HttpStatus.SC_NO_CONTENT))
.handler("/missing", new TestHttpRequestHandler().code(HttpStatus.SC_NOT_FOUND).response("Missing"))
.handler("/redirect", new TestHttpRequestHandler().code(HttpStatus.SC_MOVED_TEMPORARILY).response("Redirect").header("Location", "/simple"))
.handler("/cycle", new TestHttpRequestHandler().code(HttpStatus.SC_MOVED_TEMPORARILY).response("Redirect").header("Location", "/cycle"))
.handler("/secure", new TestHttpRequestHandler().code(HttpStatus.SC_MOVED_TEMPORARILY).response("Redirect").header("Location", "https://0.0.0.0/"))
.handler("/auth", new AuthHandler("test", "test", "OK"))
.handler("/auth_escape", new AuthHandler("test@me:/", "test", "OK"))
.handler("/auth_escape2", new AuthHandler("test@me:test", "", "OK"))
.handler("/no_credentials", new CheckNoCredentials())
.start();
baseUrl = server.getUrl();
}