### Question:
EncryptionWrapperFactory { public static ParallelDecryptionCipherWrapper instanceDecrypt(final PipelineConfiguration pipelineConfiguration, final NegotiatedClientServerConfiguration negotiatedClientServerConfiguration) throws ClientServerNegotiationException { if (pipelineConfiguration == null) { throw new IllegalArgumentException("null pipelineConfiguration"); } if (negotiatedClientServerConfiguration == null) { throw new IllegalArgumentException("null negotiatedClientServerConfiguration"); } if (!negotiatedClientServerConfiguration.isSslConnection()) { throw new JargonRuntimeException("no encryption was negotiated,should not call this factory"); } if (pipelineConfiguration.getEncryptionAlgorithmEnum() == EncryptionAlgorithmEnum.AES_256_CBC) { return new AesCipherDecryptWrapper(pipelineConfiguration, negotiatedClientServerConfiguration); } else { throw new ClientServerNegotiationException( "unsuppored decryption algo:" + pipelineConfiguration.getEncryptionAlgorithmEnum()); } }  static ParallelEncryptionCipherWrapper instanceEncrypt(final PipelineConfiguration pipelineConfiguration,
			final NegotiatedClientServerConfiguration negotiatedClientServerConfiguration); static ParallelDecryptionCipherWrapper instanceDecrypt(final PipelineConfiguration pipelineConfiguration,
			final NegotiatedClientServerConfiguration negotiatedClientServerConfiguration);  }### Answer:
@Test public void testGetAesDecryptFromFactory() throws Exception { SettableJargonPropertiesMBean props = new SettableJargonProperties(); props.setEncryptionKeySize(256); props.setEncryptionAlgorithmEnum(EncryptionAlgorithmEnum.AES_256_CBC); PipelineConfiguration pipelineConfiguration = PipelineConfiguration.instance(props); NegotiatedClientServerConfiguration negotiatedClientServerConfiguration = new NegotiatedClientServerConfiguration( true); AESKeyGenerator keyGen = new AESKeyGenerator(pipelineConfiguration, negotiatedClientServerConfiguration); negotiatedClientServerConfiguration.setSecretKey(keyGen.generateKey()); ParallelCipherWrapper actual = EncryptionWrapperFactory.instanceDecrypt(pipelineConfiguration, negotiatedClientServerConfiguration); Assert.assertNotNull(actual); Assert.assertTrue(actual instanceof AesCipherDecryptWrapper); }