this.documentsPreparer = new DocumentsPreparer(pdfValidator);
this.digipostClientConfig = digipostClientConfig;
}
public MessageDelivery sendMultipartMessage(Message message, Map<String, DocumentContent> documentsAndContent) {
EncryptionKeyAndDocsWithInputstream encryptionAndInputStream = fetchEncryptionKeyForRecipientIfNecessaryAndMapContentToInputstream(message, documentsAndContent);
<BUG>Encrypter encrypter = encryptionAndInputStream.digipostPublicKeys.map(keyToEncrypter).orElse(FAIL_IF_TRYING_TO_ENCRYPT);
</BUG>
Map<Document, InputStream> documentInputStream = encryptionAndInputStream.documentsAndInputstream;
Message singleChannelMessage = encryptionAndInputStream.getSingleChannelMessage();
try {

this.documentsPreparer = new DocumentsPreparer(pdfValidator);
this.digipostClientConfig = digipostClientConfig;
}
public MessageDelivery sendMultipartMessage(Message message, Map<String, DocumentContent> documentsAndContent) {
EncryptionKeyAndDocsWithInputstream encryptionAndInputStream = fetchEncryptionKeyForRecipientIfNecessaryAndMapContentToInputstream(message, documentsAndContent);
Encrypter encrypter = encryptionAndInputStream.digipostPublicKeys.map(Encrypter::using).orElse(FAIL_IF_TRYING_TO_ENCRYPT);
Map<Document, InputStream> documentInputStream = encryptionAndInputStream.documentsAndInputstream;
Message singleChannelMessage = encryptionAndInputStream.getSingleChannelMessage();
try {
