public boolean validate(final Protocol protocol, final LoginOptions options) {
        return protocol.validate(this, options);
    }
@Test
    public void testLoginWithoutUsername() {
        Credentials credentials = new Credentials(null,
                PreferencesFactory.get().getProperty("connection.login.anon.pass"));
        assertFalse(credentials.validate(new TestProtocol(Scheme.ftp), new LoginOptions()));
    }