Because DefaultCryptoMaterialsManager
adds a value to the encryption context if a signed algorithm suite is used, we need to throw an error if the requested encryption context already contains that key.
https://github.com/aws/aws-encryption-sdk-java/blob/eb8702e82759cca53eddc3b5f8423e74ec31aff1/src/main/java/com/amazonaws/encryptionsdk/DefaultCryptoMaterialsManager.java#L55-L58