@Test
public void findIssueKeys() throws MalformedURLException {

    Pattern issuePattern = JiraSite.DEFAULT_ISSUE_PATTERN;
    Assert.assertEquals(Sets.newHashSet("JENKINS-43400"), BlueJiraIssue.findIssueKeys("[JENKINS-43400] Print the error to the build log rather than", issuePattern));
    Assert.assertEquals(Sets.newHashSet("JENKINS-43400"), BlueJiraIssue.findIssueKeys("JENKINS-43400 Print the error to the build log rather than", issuePattern));
    Assert.assertEquals(Sets.newHashSet("JENKINS-43400"), BlueJiraIssue.findIssueKeys("foo/JENKINS-43400 Print the error to the build log rather than", issuePattern));
    Assert.assertEquals(Sets.newHashSet("TEST-123", "EXAMPLE-123", "JENKINS-43400"), BlueJiraIssue.findIssueKeys("foo/JENKINS-43400 TEST-123 [EXAMPLE-123] Print the error to the build log rather than", issuePattern));
}