// Path: domain/src/main/java/com/raulh82vlc/TransactionsViewer/domain/exceptions/CustomException.java
// public class CustomException extends Exception {
//     public CustomException(String detailMessage) {
//         super(detailMessage);
//     }
// }
// 
// Path: domain/src/main/java/com/raulh82vlc/TransactionsViewer/domain/models/Rate.java
// public class Rate {
//     @SerializedName("from")
//     private String fromCurrency;
//     @SerializedName("rate")
//     private String rate;
//     @SerializedName("to")
//     private String toCurrency;
// 
//     public String getFromCurrency() {
//         return fromCurrency;
//     }
// 
//     public String getRate() {
//         return rate;
//     }
// 
//     public String getToCurrency() {
//         return toCurrency;
//     }
// }
// 
// 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 java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.inject.Inject;
import android.content.Context;
import android.content.res.AssetManager;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.raulh82vlc.TransactionsViewer.domain.exceptions.CustomException;
import com.raulh82vlc.TransactionsViewer.domain.models.Rate;
import com.raulh82vlc.TransactionsViewer.domain.models.Transaction;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;

    @Override
    public List<Rate> getRatesList(Context context, String path) throws CustomException {
        String json;
        try {
            json  = readFileAsString(context, path);
        } catch (IOException e) {
            throw new CustomException(e.getMessage());
        }
        if (json.isEmpty()) {
            return Collections.emptyList();
        } else {
            Type listType = new TypeToken<ArrayList<Rate>>() {
            }.getType();
            return mGson.fromJson(json, listType);
        }
    }

    @Override
    public List<Transaction> getTransactionsList(Context context, String path) throws CustomException {
        String json;
        try {
            json  = readFileAsString(context, path);
        } catch (IOException e) {
            throw new CustomException(e.getMessage());
        }

        if (json.isEmpty()) {
            return Collections.emptyList();
        } else {
// Path: domain/src/main/java/com/raulh82vlc/TransactionsViewer/domain/exceptions/CustomException.java
// public class CustomException extends Exception {
//     public CustomException(String detailMessage) {
//         super(detailMessage);
//     }
// }
// 
// Path: domain/src/main/java/com/raulh82vlc/TransactionsViewer/domain/models/Rate.java
// public class Rate {
//     @SerializedName("from")
//     private String fromCurrency;
//     @SerializedName("rate")
//     private String rate;
//     @SerializedName("to")
//     private String toCurrency;
// 
//     public String getFromCurrency() {
//         return fromCurrency;
//     }
// 
//     public String getRate() {
//         return rate;
//     }
// 
//     public String getToCurrency() {
//         return toCurrency;
//     }
// }
// 
// 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/datasources/json/JSONOperationsImpl.java
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.inject.Inject;
import android.content.Context;
import android.content.res.AssetManager;
import android.util.Log;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import com.raulh82vlc.TransactionsViewer.domain.exceptions.CustomException;
import com.raulh82vlc.TransactionsViewer.domain.models.Rate;
import com.raulh82vlc.TransactionsViewer.domain.models.Transaction;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;


    @Override
    public List<Rate> getRatesList(Context context, String path) throws CustomException {
        String json;
        try {
            json  = readFileAsString(context, path);
        } catch (IOException e) {
            throw new CustomException(e.getMessage());
        }
        if (json.isEmpty()) {
            return Collections.emptyList();
        } else {
            Type listType = new TypeToken<ArrayList<Rate>>() {
            }.getType();
            return mGson.fromJson(json, listType);
        }
    }

    @Override
    public List<Transaction> getTransactionsList(Context context, String path) throws CustomException {
        String json;
        try {
            json  = readFileAsString(context, path);
        } catch (IOException e) {
            throw new CustomException(e.getMessage());
        }

        if (json.isEmpty()) {
            return Collections.emptyList();
        } else {
            Type listType = new TypeToken<ArrayList<Transaction>>()