@Override
    public void warn(final Host bookmark, final String title, final String reason,
                     final String defaultButton, final String cancelButton, final String preference) throws ConnectionCanceledException {
        console.printf("%n%s", reason);
        if(!prompt.prompt(String.format("%s (y) or %s (n): ", defaultButton, cancelButton))) {
            // Switch protocol
            throw new LoginCanceledException();
        }
    }
@Test(expected = LoginCanceledException.class)
    public void testWarn() throws Exception {
        new TerminalLoginCallback(new TerminalPromptReader() {
            @Override
            public boolean prompt(final String message) {
                return false;
            }
        }).warn(new Host(new TestProtocol()), "", "", "", "", "");
    }