verifyZeroInteractions(issueAuthorizationDao);
}
@Test
public void remove_component_permission_from_anyone_group() throws Exception {
ComponentDto project = ComponentTesting.newProjectDto().setId(10L).setKey("org.sample.Sample");
when(componentDao.getByKey(session, "org.sample.Sample")).thenReturn(project);
params = buildPermissionChangeParams(null, DefaultGroups.ANYONE, "org.sample.Sample", "codeviewer");
setUpComponentGroupPermissions(DefaultGroups.ANYONE, 10L, "codeviewer");
MockUserSession.set().setLogin("admin").addProjectPermissions(UserRole.ADMIN, "org.sample.Sample");
service.removePermission(params);
verify(permissionFacade).deleteGroupPermission(eq(10L), eq((Long) null), eq("codeviewer"), eq(session));
verify(issueAuthorizationDao).synchronizeAfter(eq(session), any(Date.class), eq(ImmutableMap.of("project", project.uuid())));
}