/**
* Test the GitHubService implementation for opening a new issue.
*/
@Test
public void editIssue() throws Exception {
final GitHubService service = new GitHubService();
final GitHubIssue issue = new GitHubIssue();
issue.setUser(TEST_USER);
issue.setBody("This is a test body");
issue.setTitle("Issue Title");
GitHubIssue newIssue = service.openIssue(TEST_USER, TEST_PROJECT, issue,
new GitHubCredentials(TEST_USER,API_KEY));
assertTrue(newIssue != null);
newIssue.setTitle(newIssue.getTitle()+" - modified");
newIssue.setBody(newIssue.getBody()+" - modified");
service.editIssue(TEST_USER, TEST_PROJECT, issue, new GitHubCredentials(TEST_USER,API_KEY));
GitHubIssue showIssue = service.showIssue(TEST_USER, TEST_PROJECT, issue.getNumber());
assertTrue(showIssue != null);
assertEquals(newIssue.getTitle(),showIssue.getTitle());
}