assertNull(extraUserIssueField.getValue());
}
@Test
public void testParseIssueJira5x0Representation() throws JSONException {
final Issue issue = parseIssue("/json/issue/valid-5.0.json");
assertEquals(3, Iterables.size(issue.getComments()));
final BasicPriority priority = issue.getPriority();
assertNotNull(priority);
assertEquals("Major", priority.getName());
assertEquals("my description", issue.getDescription());
assertEquals("TST", issue.getProject().getKey());
assertEquals(Long.valueOf(10000), issue.getId());
assertNotNull(issue.getDueDate());
assertEquals(toDateTimeFromIsoDate("2010-07-05"), issue.getDueDate());
assertEquals(4, Iterables.size(issue.getAttachments()));
assertEquals(1, Iterables.size(issue.getIssueLinks()));
assertEquals(1.457, issue.getField("customfield_10000").getValue());
assertThat(Iterables.transform(issue
.getComponents(), EntityHelper.GET_ENTITY_NAME_FUNCTION), containsInAnyOrder("Component A", "Component B"));
assertEquals(2, Iterables.size(issue.getWorklogs()));
assertEquals(1, issue.getWatchers().getNumWatchers());
assertFalse(issue.getWatchers().isWatching());
assertEquals(new TimeTracking(2700, 2220, 180), issue.getTimeTracking());
assertEquals(Visibility.role("Developers"), issue.getWorklogs().iterator().next().getVisibility());
assertEquals(Visibility.group("jira-users"), Iterables.get(issue.getWorklogs(), 1).getVisibility());
}