protected Principal setupPrincipal(Owner owner, Access role) {
return setupPrincipal("someuser", owner, role);
}
protected Principal setupPrincipal(String username, Owner owner, Access verb) {
OwnerPermission p = new OwnerPermission(owner, verb);
// Only need a detached owner permission here:
Principal ownerAdmin = new UserPrincipal(username, Arrays.asList(new Permission[] {
p}), false);
setupPrincipal(ownerAdmin);
return ownerAdmin;