class MailRepositoryStoreConfiguration {

    static Optional<Protocol> computeDefaultProtocol(List<Item> items) {
        return items.stream()
            .flatMap(item -> item.getProtocols().stream())
            .findFirst();
    }

    public  MailRepositoryStoreConfiguration(List<Item> items, Optional<Protocol> defaultProtocol);

}