}
}
@Test
public void testIssueDefaults() throws RedmineException {
final Issue template = IssueFactory.createWithSubject("This is a subject");
final Issue result = issueManager.createIssue(projectKey, template);
try {
Assert.assertNotNull(result.getId());
Assert.assertEquals("This is a subject", result.getSubject());
Assert.assertNull(result.getParentId());
Assert.assertNull(result.getEstimatedHours());
Assert.assertEquals(Float.valueOf(0), result.getSpentHours());
Assert.assertNull(result.getAssignee());
Assert.assertNotNull(result.getPriorityText());
Assert.assertNotNull(result.getPriorityId());
Assert.assertEquals(Integer.valueOf(0), result.getDoneRatio());
Assert.assertNotNull(result.getProject());
Assert.assertNotNull(result.getAuthor());
Assert.assertNull(result.getStartDate());
Assert.assertNull(result.getDueDate());
Assert.assertNotNull(result.getTracker());
Assert.assertEquals("", result.getDescription());
Assert.assertNotNull(result.getCreatedOn());
Assert.assertNotNull(result.getUpdatedOn());
Assert.assertNotNull(result.getStatusId());
Assert.assertNotNull(result.getStatusName());
Assert.assertNull(result.getTargetVersion());
Assert.assertNull(result.getCategory());
Assert.assertNull(result.getNotes());
Assert.assertNotNull(result.getCustomFields());
Assert.assertNotNull(result.getJournals());
Assert.assertNotNull(result.getRelations());
Assert.assertNotNull(result.getAttachments());
} finally {
issueManager.deleteIssue(result.getId());
}
}