MockUserSession.set().setLogin("admin").addProjectPermissions(UserRole.ADMIN, "org.sample.Sample");
service.addPermission(params);
verify(permissionFacade).insertGroupPermission(eq(10L), eq(2L), eq("user"), eq(session));
verify(issueAuthorizationDao).synchronizeAfter(eq(session), any(Date.class), eq(ImmutableMap.of("project", project.uuid())));
}
@Test
public void add_global_permission_to_anyone_group() throws Exception {
params = buildPermissionChangeParams(null, DefaultGroups.ANYONE, GlobalPermissions.QUALITY_PROFILE_ADMIN);