void () { ServerUnavailableCallback callback = new ServerUnavailableCallback(new AuthenticationService(vcs, true), myRepositoryUrl); StreamEx<String[]> error2Exception = StreamEx.of(SVN_ERRORS).append(StreamEx.of(UsernamePasswordCallbackTest.AUTH_ERRORS).map(e -> new String[]{e, null})); for (String[] pair : error2Exception) { String svnError = pair[0]; String exceptionText = pair[1]; if (exceptionText == null) { assertFalse(svnError, callback.canHandle(svnError)); } else { assertTrue(svnError, callback.canHandle(svnError)); try { callback.getCredentials(svnError); } catch (SvnBindException e) { assertEquals(svnError, exceptionText, e.getMessage()); continue; } fail(svnError); } } }