public void setIdentity(final Local file) {
        this.identity = file;
        this.passed = false;
    }
@Test
    public void testSetIdentity() throws Exception {
        Credentials c = new Credentials();
        c.setIdentity(new Local("~/.ssh/unknown.rsa"));
        assertFalse(c.isPublicKeyAuthentication());
        final Local t = new Local(PreferencesFactory.get().getProperty("tmp.dir"), "id_rsa");
        LocalTouchFactory.get().touch(t);
        c.setIdentity(t);
        assertTrue(c.isPublicKeyAuthentication());
        t.delete();
    }