final File tempFile = File.createTempFile("jim-integration-test", ".txt");
tempFile.deleteOnExit();
FileWriter writer = new FileWriter(tempFile);
writer.write("This is the content of my file which I am going to upload to JIRA for testing.");
writer.close();
issueClient.addAttachments(pm, issue.getAttachmentsUri(), tempFile);
final Issue issueWithAttachments = issueClient.getIssue("TST-5", pm);
final Iterable<Attachment> attachments = issueWithAttachments.getAttachments();
assertEquals(1, Iterables.size(attachments));
assertTrue(IOUtils.contentEquals(new FileInputStream(tempFile),