void () { assumeServerAccessible(JIRA_5_TEST_SERVER_URL); myRepository.setSearchQuery("foo < bar"); try { myRepository.getIssues("", 50, 0); fail(); } catch (Exception e) { assertEquals("Request failed. Reason: \"Field 'foo' does not exist or you do not have permission to view it.\"", e.getMessage()); } }