}
public static BaseMapper.Context initTestContext(Dispatcher d) throws IOException {
BaseMapper.Context mCtx = d.addContext(null, "", null, null, null, null);
mCtx.addWrapper("/", new StaticContentService()
.setContentType("text/html")
.setData("<a href='/proc/cpool/client'>Client pool</a><br>" +
"<a href='/proc/cpool/server'>Server pool</a><br>" +
"<a href='/proc/cpool/proxy'>Proxy pool</a><br>" +
""));
mCtx.addWrapper("/favicon.ico",
new StaticContentService().setStatus(404).setData("Not found"));
mCtx.addWrapper("/hello", new StaticContentService().setData("Hello world"));
mCtx.addWrapper("/2nd", new StaticContentService().setData("Hello world2"));
mCtx.addWrapper("/echo/*", new EchoCallback());
mCtx.addWrapper("/sleep/1", new SleepCallback().setData("sleep 1"));
mCtx.addWrapper("/sleep/10", new SleepCallback().sleep(10000).setData(
"sleep 1"));
mCtx.addWrapper("/chunked/*", new StaticContentService().setData("AAAA")
.chunked());
mCtx.addWrapper("/helloClose", new HttpService() {
@Override
public void service(HttpRequest httpReq, HttpResponse httpRes)
throws IOException {