// Path: android/src/main/java/com/raulh82vlc/TransactionsViewer/domain/models/ProductUI.java
// public class ProductUI implements Parcelable {
// 
//     private String sku;
//     private List<TransactionUI> transactions;
// 
//     public static final Creator<ProductUI> CREATOR = new Creator<ProductUI>() {
//         @Override
//         public ProductUI createFromParcel(Parcel in) {
//             return new ProductUI(in);
//         }
// 
//         @Override
//         public ProductUI[] newArray(int size) {
//             return new ProductUI[size];
//         }
//     };
// 
//     private ProductUI(Parcel in) {
//         sku = in.readString();
//         if (transactions == null) {
//             transactions = new ArrayList<>();
//         }
//         in.readList(transactions, Transaction.class.getClassLoader());
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(sku);
//         dest.writeList(transactions);
//     }
// 
//     public ProductUI(String key, List<Transaction> values, String toCurrency) {
//         sku = key;
//         transactions = new ArrayList<>(values.size());
//         for (Transaction transaction : values) {
//             transactions.add(new TransactionUI(transaction.getCurrency(), toCurrency,
//                     transaction.getAmountPerTransaction(), "0"));
//         }
// 
//     }
// 
//     public List<TransactionUI> getTransactions() {
//         return transactions;
//     }
// 
//     public String getSku() {
//         return sku;
//     }
// }
// 
// Path: domain/src/main/java/com/raulh82vlc/TransactionsViewer/domain/models/Transaction.java
// public class Transaction {
// 
//     @SerializedName("sku")
//     private String skuIdentifier;
// 
//     @SerializedName("amount")
//     private String amountPerTransaction;
// 
//     @SerializedName("currency")
//     private String currency;
// 
//     public String getSkuIdentifier() {
//         return skuIdentifier;
//     }
// 
//     public String getAmountPerTransaction() {
//         return amountPerTransaction;
//     }
// 
//     public String getCurrency() {
//         return currency;
//     }
// }


import com.raulh82vlc.TransactionsViewer.di.scopes.ActivityScope;
import com.raulh82vlc.TransactionsViewer.domain.models.ProductUI;
import com.raulh82vlc.TransactionsViewer.domain.models.Transaction;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.inject.Inject;

    /**
     * Transforms a List {@link Transaction} into an TreeMap of {@link Transaction}
     * to maintain the order from A to Z sorted.
     */
    public TreeMap<String, List<Transaction>> transform(List<Transaction> transactionList) {
        if (transactionList == null) {
            throw new IllegalArgumentException("Cannot transform a null value");
        }
        TreeMap<String, List<Transaction>> map = new TreeMap<>();
        for (Transaction transaction : transactionList) {
            String key = transaction.getSkuIdentifier();
            if (map.containsKey(key)) {
                map.get(key).add(transaction);
            } else {
                List<Transaction> transactions = new ArrayList<>();
                transactions.add(transaction);
                map.put(key, transactions);
            }
        }
        return map;
    }

    public List<ProductUI> transform(Map<String, List<Transaction>> transactionsDictionary) {
        if (transactionsDictionary == null) {
            throw new IllegalArgumentException("Cannot transform a null value");
        }
        ProductUI productUI;
        List<ProductUI> productUIs = new ArrayList<>();
        for (Map.Entry<String, List<Transaction>> entry : transactionsDictionary.entrySet()) {
// Path: android/src/main/java/com/raulh82vlc/TransactionsViewer/domain/models/ProductUI.java
// public class ProductUI implements Parcelable {
// 
//     private String sku;
//     private List<TransactionUI> transactions;
// 
//     public static final Creator<ProductUI> CREATOR = new Creator<ProductUI>() {
//         @Override
//         public ProductUI createFromParcel(Parcel in) {
//             return new ProductUI(in);
//         }
// 
//         @Override
//         public ProductUI[] newArray(int size) {
//             return new ProductUI[size];
//         }
//     };
// 
//     private ProductUI(Parcel in) {
//         sku = in.readString();
//         if (transactions == null) {
//             transactions = new ArrayList<>();
//         }
//         in.readList(transactions, Transaction.class.getClassLoader());
//     }
// 
//     @Override
//     public int describeContents() {
//         return 0;
//     }
// 
//     @Override
//     public void writeToParcel(Parcel dest, int flags) {
//         dest.writeString(sku);
//         dest.writeList(transactions);
//     }
// 
//     public ProductUI(String key, List<Transaction> values, String toCurrency) {
//         sku = key;
//         transactions = new ArrayList<>(values.size());
//         for (Transaction transaction : values) {
//             transactions.add(new TransactionUI(transaction.getCurrency(), toCurrency,
//                     transaction.getAmountPerTransaction(), "0"));
//         }
// 
//     }
// 
//     public List<TransactionUI> getTransactions() {
//         return transactions;
//     }
// 
//     public String getSku() {
//         return sku;
//     }
// }
// 
// Path: domain/src/main/java/com/raulh82vlc/TransactionsViewer/domain/models/Transaction.java
// public class Transaction {
// 
//     @SerializedName("sku")
//     private String skuIdentifier;
// 
//     @SerializedName("amount")
//     private String amountPerTransaction;
// 
//     @SerializedName("currency")
//     private String currency;
// 
//     public String getSkuIdentifier() {
//         return skuIdentifier;
//     }
// 
//     public String getAmountPerTransaction() {
//         return amountPerTransaction;
//     }
// 
//     public String getCurrency() {
//         return currency;
//     }
// }


// Path: android/src/main/java/com/raulh82vlc/TransactionsViewer/domain/interactors/mappers/TransactionsListModelDataMapper.java
import com.raulh82vlc.TransactionsViewer.di.scopes.ActivityScope;
import com.raulh82vlc.TransactionsViewer.domain.models.ProductUI;
import com.raulh82vlc.TransactionsViewer.domain.models.Transaction;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.TreeMap;
import javax.inject.Inject;


    /**
     * Transforms a List {@link Transaction} into an TreeMap of {@link Transaction}
     * to maintain the order from A to Z sorted.
     */
    public TreeMap<String, List<Transaction>> transform(List<Transaction> transactionList) {
        if (transactionList == null) {
            throw new IllegalArgumentException("Cannot transform a null value");
        }
        TreeMap<String, List<Transaction>> map = new TreeMap<>();
        for (Transaction transaction : transactionList) {
            String key = transaction.getSkuIdentifier();
            if (map.containsKey(key)) {
                map.get(key).add(transaction);
            } else {
                List<Transaction> transactions = new ArrayList<>();
                transactions.add(transaction);
                map.put(key, transactions);
            }
        }
        return map;
    }

    public List<ProductUI> transform(Map<String, List<Transaction>> transactionsDictionary) {
        if (transactionsDictionary == null) {
            throw new IllegalArgumentException("Cannot transform a null value");
        }
        ProductUI productUI;
        List<ProductUI> productUIs = new ArrayList<>();
        for (Map.Entry<String, List<Transaction>> entry : transactionsDictionary.entrySet()) {
            productUI = new ProductUI(entry.getKey(), entry.getValue(), GBP);