class AttachmentLoader {

    @VisibleForTesting
    Mono<List<MessageAttachmentMetadata>> getAttachments(List<MessageAttachmentRepresentation> attachmentRepresentations) {
        return Flux.fromIterable(attachmentRepresentations)
                .flatMapSequential(attachmentRepresentation ->
                        attachmentMapper.getAttachmentsAsMono(attachmentRepresentation.getAttachmentId())
                            .map(attachment -> constructMessageAttachment(attachment, attachmentRepresentation)))
                .collect(Guavate.toImmutableList());
    }

    public  AttachmentLoader(CassandraAttachmentMapper attachmentMapper);

}