tested the setPermission