in component-test/src/main/java/TestRoles.java [162:178]
public void testChangePharaohRoleFails() throws InterruptedException {
try (final AutoUserContext ignore = loginAdmin()) {
final Role referenceRole = getTestSubject().getRole(SU_ROLE);
final Role roleChangeRequest = buildRole(SU_ROLE, buildSelfPermission());
try {
getTestSubject().changeRole(SU_ROLE, roleChangeRequest);
Assert.fail("Should not be able to change the pharaoh role.");
}
catch (final IllegalArgumentException expected) {
//noinspection EmptyCatchBlock
}
final Role unChangedRole = getTestSubject().getRole(SU_ROLE);
Assert.assertEquals(referenceRole, unChangedRole);
}
}