@Override
    public Collection<Identity> getIdentities() {
        if(null == proxy) {
            log.warn("Missing proxy reference");
            return Collections.emptyList();
        }
        if(log.isDebugEnabled()) {
            log.debug(String.format("Retrieve identities from proxy %s", proxy));
        }
        final List<Identity> identities = Arrays.asList(proxy.getIdentities());
        if(log.isDebugEnabled()) {
            log.debug(String.format("Found %d identities", identities.size()));
        }
        return identities;
    }
@Test(expected = AgentProxyException.class)
    public void testGetIdentities() throws Exception {
        assumeTrue(Factory.Platform.getDefault().equals(Factory.Platform.Name.mac));
        final OpenSSHAgentAuthenticator authenticator = new OpenSSHAgentAuthenticator(StringUtils.EMPTY);
        final Collection<Identity> identities = authenticator.getIdentities();
        assertNotNull(authenticator.getProxy());
        assertFalse(identities.isEmpty());
    }