List lst = getCollection(ct);
lst.add(buildProject(1, "eCookbook", "ecookbook", new int[]{1,2,3}, new int[]{1,2,3,4,6,7}, new int[]{1,2}, new int[]{1,2,6,9}));
}
static Project buildProject(int id, String name, String identifier, int[] trackers, int[] versions, int[] categories, int[] customFields) throws Exception {
Project project = new Project();
setId(project, id);
project.setName(name);
project.setIdentifier(identifier);
project.setTrackerIds(trackers);
project.setVersionIds(versions);
project.setIssueCategoryIds(categories);
//IssueCustomFields
Field field = Project.class.getDeclaredField("customFieldIdsByTrackerId");
field.setAccessible(true);
HashMap<Integer, int[]> customFieldIdsByTrackerId = new HashMap<Integer, int[]>(trackers.length);