context.setContextPath("/");
context.setSecurityHandler(basicAuth(username, password, "Couchbase Server Admin / REST"));
setHandler(context);
context.addServlet(new ServletHolder(new StatsServlet(couchbaseBehavior, capiBehavior)), "/_stats");
context.addServlet(new ServletHolder(new ClusterMapServlet(couchbaseBehavior)),
"/pools/*");
context.addServlet(new ServletHolder(new BucketMapServlet(
couchbaseBehavior, numVbuckets)), "/pools/default/buckets/*");
context.addServlet(
new ServletHolder(new CAPIServlet(capiBehavior)), "/*");