ComponentDto file3 = ComponentTesting.newFileDto(project1).setKey("file3");
tester.get(ComponentDao.class).insert(session, project1, project2, project3, file1, file2, file3);
// project1 can be seen by sonar-users
GroupDto groupDto = new GroupDto().setName("sonar-users");
db.groupDao().insert(session, groupDto);
tester.get(PermissionFacade.class).insertGroupPermission(project1.getId(), groupDto.getName(), UserRole.USER, session);
// project2 can be seen by sonar-admins
groupDto = new GroupDto().setName("sonar-admins");
db.groupDao().insert(session, groupDto);
tester.get(PermissionFacade.class).insertGroupPermission(project2.getId(), groupDto.getName(), UserRole.USER, session);
// project3 cannot be seen by anyone
db.issueAuthorizationDao().synchronizeAfter(session, new Date(0));