@Test
public void testGetIssuesBySummary() {
String summary = "issue with subject ABC";
try {
Issue issue = IssueFactory.createWithSubject(summary);
User assignee = IntegrationTestHelper.getOurUser();
issue.setAssignee(assignee);
Issue newIssue = issueManager.createIssue(projectKey, issue);
assertNotNull("Checking returned result", newIssue);
assertNotNull("New issue must have some ID",
newIssue.getId());
// try to find the issue
List<Issue> foundIssues = issueManager.getIssuesBySummary(projectKey,
summary);
assertNotNull("Checking if search results is not NULL",
foundIssues);
assertTrue("Search results must be not empty",
!(foundIssues.isEmpty()));
Issue loadedIssue1 = RedmineTestUtils.findIssueInList(foundIssues,
newIssue.getId());
assertNotNull(loadedIssue1);
assertEquals(summary, loadedIssue1.getSubject());
} catch (Exception e) {
e.printStackTrace();
fail();
}
}