// reset page manager cache
pageManager.reset();
// setup test subjects
Set principals = new PrincipalsSet();
principals.add(new TestUser("admin"));
principals.add(new TestRole("admin"));
Subject adminSubject = new Subject(true, principals, new HashSet(), new HashSet());
principals = new PrincipalsSet();
principals.add(new TestUser("user"));
Subject userSubject = new Subject(true, principals, new HashSet(), new HashSet());
principals = new PrincipalsSet();
principals.add(new TestUser("manager"));
principals.add(new TestRole("manager"));
Subject managerSubject = new Subject(true, principals, new HashSet(), new HashSet());
principals = new PrincipalsSet();
principals.add(new TestUser("guest"));
Subject guestSubject = new Subject(true, principals, new HashSet(), new HashSet());
// setup test as admin user
Exception setup = (Exception)JSSubject.doAsPrivileged(adminSubject, new PrivilegedAction()
{