### Question:
BasicEncryptionTransformFactory extends
        EncryptionTransformFactory<BasicEncryptionOutputTransform, BasicEncryptionInputTransform> { public void addMasterDecryptionKey(KeyPair pair) { try { String fingerprint = KeyUtils .getRsaPublicKeyFingerprint((RSAPublicKey) pair.getPublic(), provider); masterDecryptionKeys.put(fingerprint, pair); } catch (NoSuchAlgorithmException e) { throw new RuntimeException("Error adding master key", e); } } BasicEncryptionTransformFactory();  BasicEncryptionTransformFactory(KeyPair masterEncryptionKey, 
            Set<KeyPair> masterDecryptionKeys);  BasicEncryptionTransformFactory(KeyPair masterEncryptionKey, 
            Set<KeyPair> masterDecryptionKeys, Provider provider); void setMasterEncryptionKey(KeyPair pair); void addMasterDecryptionKey(KeyPair pair); @Override Map<String, String> rekey(Map<String, String> metadata); @Override BasicEncryptionOutputTransform getOutputTransform(
            OutputStream streamToEncodeTo, Map<String, String> metadataToEncode); @Override BasicEncryptionOutputTransform getOutputTransform(
            InputStream streamToEncode, Map<String, String> metadataToEncode); @Override BasicEncryptionInputTransform getInputTransform(
            String transformConfig, InputStream streamToDecode,
            Map<String, String> metadata); public KeyPair masterEncryptionKey; }### Answer:
@Test public void testAddMasterDecryptionKey() throws Exception { BasicEncryptionTransformFactory factory = new BasicEncryptionTransformFactory(); factory.setCryptoProvider(provider); factory.setMasterEncryptionKey(masterKey); factory.addMasterDecryptionKey(oldKey); }