void () { assumeServerAccessible(JIRA_5_TEST_SERVER_URL); myRepository.setUsername("german"); myRepository.setUsername("wrong password"); //noinspection ConstantConditions final Exception exception = myRepository.createCancellableConnection().call(); assertNotNull(exception); assertEquals(TaskBundle.message("failure.login"), exception.getMessage()); }