</BUG>
final Map<Document, InputStream> prepared = new LinkedHashMap<>();
if(message.recipient.hasPrintDetails() && message.recipient.hasDigipostIdentification()){
throw new IllegalStateException("Forventet message med enkelt kanal");
<BUG>}
for (Elem<Document> i : on(on(documentsAndContent.keySet()).sorted(message.documentOrder())).indexed()) {
Document document = i.value;</BUG>
if (document.willBeEncrypted()) {
byte[] byteContent = toByteArray(documentsAndContent.get(document));
LOG.debug("Validerer dokument med uuid '{}' før kryptering", document.uuid);

DocumentsPreparer(PdfValidator pdfValidator) {
this.pdfValidator = pdfValidator;
}
Map<Document, InputStream> prepare(
Map<Document, InputStream> documentsAndContent, Message message,
Encrypter encrypter, Supplier<PdfValidationSettings> pdfValidationSettings) throws IOException {
final Map<Document, InputStream> prepared = new LinkedHashMap<>();
if(message.recipient.hasPrintDetails() && message.recipient.hasDigipostIdentification()){
throw new IllegalStateException("Forventet message med enkelt kanal");
}
for (Document document : (Iterable<Document>) documentsAndContent.keySet().stream().sorted(message.documentOrder())::iterator) {
if (document.willBeEncrypted()) {
byte[] byteContent = toByteArray(documentsAndContent.get(document));
LOG.debug("Validerer dokument med uuid '{}' før kryptering", document.uuid);
