@Test
public void testRevokeAdminPrivilege() throws Exception {

  users.createUser("old_admin", "old_admin", UserType.LOCAL, true, true);
  final User admin = users.getAnyUser("old_admin");
  users.revokeAdminPrivilege(admin.getUserId());
  Assert.assertFalse(users.getAnyUser("old_admin").isAdmin());
}