void () { myRepository.setUrl(REDMINE_2_0_TEST_SERVER_URL + "/projects/prj-1"); try { //noinspection ConstantConditions final Exception exception = myRepository.createCancellableConnection().call(); assertNotNull("Test connection must fail when project-specific URL is specified", exception); } catch (Exception e) { assertEquals(TaskBundle.message("failure.login"), e.getMessage()); } }