Added tests for PermissionService.