@Override
    public DefaultCryptoKeyReaderConfigurationData clone() {
        DefaultCryptoKeyReaderConfigurationData clone = new DefaultCryptoKeyReaderConfigurationData();

        if (defaultPublicKey != null) {
            clone.setDefaultPublicKey(defaultPublicKey);
        }

        if (defaultPrivateKey != null) {
            clone.setDefaultPrivateKey(defaultPrivateKey);
        }

        if (publicKeys != null) {
            clone.setPublicKeys(new HashMap<String, String>(publicKeys));
        }

        if (privateKeys != null) {
            clone.setPrivateKeys(new HashMap<String, String>(privateKeys));
        }

        return clone;
    }
@Test
    public void testClone() throws Exception {
        DefaultCryptoKeyReaderConfigurationData conf = new DefaultCryptoKeyReaderConfigurationData();
        conf.setDefaultPublicKey("file:///path/to/default-public.key");
        conf.setDefaultPrivateKey("file:///path/to/default-private.key");
        conf.setPublicKey("key1", "file:///path/to/public1.key");
        conf.setPrivateKey("key2", "file:///path/to/private2.key");
        DefaultCryptoKeyReaderConfigurationData clone = conf.clone();

        conf.setDefaultPublicKey("data:AAAAA");
        conf.setDefaultPrivateKey("data:BBBBB");
        conf.setPublicKey("key1", "data:CCCCC");
        conf.setPrivateKey("key2", "data:DDDDD");

        assertEquals(clone.getDefaultPublicKey(), "file:///path/to/default-public.key");
        assertEquals(clone.getDefaultPrivateKey(), "file:///path/to/default-private.key");
        assertEquals(clone.getPublicKeys().get("key1"), "file:///path/to/public1.key");
        assertEquals(clone.getPrivateKeys().get("key2"), "file:///path/to/private2.key");
    }