session.checkComponentPermission(UserRole.USER, "com.foo:Bar:BarFile.xoo");
}
@Test(expected = ForbiddenException.class)
public void check_component_permission_when_project_not_found() throws Exception {
AuthorizationDao authorizationDao = mock(AuthorizationDao.class);
ResourceDao resourceDao = mock(ResourceDao.class);
UserSession session = new SpyUserSession("marius", authorizationDao, resourceDao).setUserId(1);
when(resourceDao.getRootProjectByComponentKey("com.foo:Bar:BarFile.xoo")).thenReturn(null);