}
@SuppressWarnings({ "rawtypes", "unchecked" })
static Issue buildIssue2() {
try {
Issue issue = new Issue();
Field idField = Issue.class.getDeclaredField("id");
idField.setAccessible(true);
idField.setInt(issue, 2);
issue.setSubject("Add ingredients categories");
issue.setDescription("Ingredients of the recipe should be classified by categories");
issue.setCreatedOn(new Date(1153335861000l));
issue.setUpdatedOn(new Date(1153336190000l));
issue.setTrackerId(2);
issue.setProjectId(1);
issue.setStatusId(2);
issue.setPriorityId(5);
issue.setSubtasks(new int[]{3,4});
issue.setWatched(true);
issue.setWatcherIds(new int[]{1,3});
issue.setWatchersViewAllowed(true);
issue.setWatchersAddAllowed(true);
issue.setWatchersDeleteAllowed(true);
issue.setStartDate(df.parse("2010-05-08"));
//dueDate
issue.setDoneRatio(10);
issue.setEstimatedHours(3.5f);
issue.setAuthorId(2);
//categoryId
issue.setAssignedToId(3);
issue.setFixedVersionId(2);
issue.setParentId(1);
issue.setAvailableStatusId(new int[]{1,3,4,5,6,2});
/* CustomValues */
issue.setCustomValues(new CustomValues());
List lst = getList(issue.getCustomValues());
lst.add(buildCustomValue(5, 2, null));
lst.add(buildCustomValue(11, 6, "2.05"));
lst.add(buildCustomValue(12, 1, "Oracle"));
lst.add(buildCustomValue(13, 9, "2009-12-01"));
/* Journals */
issue.setJournals(new Journals());
lst = getList(issue.getJournals());
lst.add(buildJournal(3, 2, 1273356000000l, "A comment with inline image: !picture.jpg!"));
/* Attachments */
issue.setAttachments(new Attachments());
lst = getList(issue.getAttachments());
lst.add(buildAttachment(10, 2, 1153336047000l, "picture.jpg", 452, "b91e08d0cf966d5c6ff411bd8c4cc3a2", "image/jpeg", "kurze Beschreibung"));
/* IssueRelations */
/* TimeEntries + sum*/
TimeEntries timeEntries = new TimeEntries();
timeEntries.setNewAllowed(true);
timeEntries.setViewAllowed(true);
Field sum = timeEntries.getClass().getDeclaredField("sum");
sum.setAccessible(true);
sum.setFloat(timeEntries, 4.25f);
issue.setTimeEntries(timeEntries);
lst = getList(timeEntries);
lst.add(buildTimeEntry(1, 4.25f, 9, 2, "2007-03-23", "My hours", buildCustomValue(5, 7, "1")));
return issue;