super.setUp();
httpServer = new Server(8191);
Context context = new Context(httpServer,"/",Context.SESSIONS);
ServletHolder servlet = new ServletHolder(new XFireServlet());
context.addServlet(servlet, "/*");
SecurityHandler sh = new SecurityHandler();
context.addHandler(sh);
HashUserRealm userRealm = new HashUserRealm();
userRealm.put("user", "pass");
userRealm.addUserToRole("user", "role");
assertNotNull(userRealm.authenticate("user", "pass", null));
sh.setUserRealm(userRealm);
Constraint constraint = new Constraint();
constraint.setName(Constraint.__BASIC_AUTH);;
constraint.setRoles(new String[]{"role"});
constraint.setAuthenticate(true);
ConstraintMapping cm = new ConstraintMapping();
cm.setConstraint(constraint);
cm.setPathSpec("/*");
context.setAttribute(XFireServlet.XFIRE_INSTANCE, getXFire());
httpServer.start();
service = getServiceFactory().create(Echo.class);
service.setProperty(ObjectInvoker.SERVICE_IMPL_CLASS, EchoImpl.class);