@Test
@SuppressWarnings("PMD")
public void testCanSetUserOperations() {

  try {
    accessControlManager.checkCanImpersonateUser(context(alice), bob.getUser());
    throw new AssertionError("expected AccessDeniedExeption");
  }
  catch (AccessDeniedException expected) {
  }
  accessControlManager.checkCanImpersonateUser(context(admin), bob.getUser());
  try {
    accessControlManager.checkCanImpersonateUser(context(kerberosInvalidAlice), bob.getUser());
    throw new AssertionError("expected AccessDeniedExeption");
  }
  catch (AccessDeniedException expected) {
  }
}