try
{
// test revokeAllPrincipal a Transient User representation to ensure
// that use-case is covered too because it requires additional
// handling (lookup of the principal Id first)
pms.revokeAllPermissions(new TransientUser("test"));
Permissions permissions = pms.getPermissions(user);
assertEquals(
"permissions should be empty for user " + user.getName(),
0,
(Collections.list(permissions.elements())).size());