// reset page manager cache
pageManager.reset();
// setup test subjects
Principal userPrincipal = new UserPrincipalImpl("admin");
Principal rolePrincipal = new RolePrincipalImpl("admin");
Set principals = new PrincipalsSet();
principals.add(userPrincipal);
principals.add(rolePrincipal);
Subject adminSubject = new Subject(true, principals, new HashSet(), new HashSet());
userPrincipal = new UserPrincipalImpl("user");
principals = new PrincipalsSet();
principals.add(userPrincipal);
Subject userSubject = new Subject(true, principals, new HashSet(), new HashSet());
userPrincipal = new UserPrincipalImpl("manager");
rolePrincipal = new RolePrincipalImpl("manager");
principals = new PrincipalsSet();
principals.add(userPrincipal);
principals.add(rolePrincipal);
Subject managerSubject = new Subject(true, principals, new HashSet(), new HashSet());
userPrincipal = new UserPrincipalImpl("guest");
principals = new PrincipalsSet();
principals.add(userPrincipal);
Subject guestSubject = new Subject(true, principals, new HashSet(), new HashSet());
// setup test as admin user