// Path: kheera-testrunner/src/main/java/gherkin/pickles/PickleCell.java
// public class PickleCell {
//     private final PickleLocation location;
//     private final String value;
// 
//     public PickleCell(PickleLocation location, String value) {
//         this.location = location;
//         this.value = value;
//     }
// 
//     public String getValue() {
//         return value;
//     }
// 
//     public PickleLocation getLocation() {
//         return location;
//     }
// }
// 
// Path: kheera-testrunner/src/main/java/gherkin/pickles/PickleRow.java
// public class PickleRow {
//     private final List<PickleCell> cells;
// 
//     public PickleRow(List<PickleCell> cells) {
//         this.cells = unmodifiableList(cells);
//     }
// 
//     public List<PickleCell> getCells() {
//         return cells;
//     }
// 
// }
// 
// Path: kheera-testrunner/src/main/java/gherkin/pickles/PickleTable.java
// public class PickleTable implements Argument {
// 
//     private final List<PickleRow> rows;
// 
//     public PickleTable(List<PickleRow> rows) {
//         this.rows = unmodifiableList(rows);
//     }
// 
//     public List<PickleRow> getRows() {
//         return rows;
//     }
// 
//     @Override
//     public PickleLocation getLocation() {
//         return rows.get(0).getCells().get(0).getLocation();
//     }
// }


import com.google.gson.JsonElement;
import com.google.gson.JsonPrimitive;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import de.jodamob.reflect.SuperReflect;
import gherkin.pickles.PickleCell;
import gherkin.pickles.PickleRow;
import gherkin.pickles.PickleTable;
        int count = dataTable.getRows().size();
        if (count == 1) {
            for (PickleCell cell : dataTable.getRows().get(0).getCells()) {
                result.add(replaceWithTestData(testData, cell.getValue()));
            }
        } else {
            for (PickleRow row : dataTable.getRows()) {
                result.add(replaceWithTestData(testData, row.getCells().get(0).getValue()));
            }
        }
        return Collections.unmodifiableList(result);
    }

    static List<Map<String, String>> toMaps(PickleTable dataTable) {
        List<Map<String, String>> result = new ArrayList<Map<String, String>>();
        List<String> keys = raw(dataTable.getRows().get(0));
        int count = dataTable.getRows().size();
        for (int i = 1; i < count; i++) {
            List<String> valueRow = raw(dataTable.getRows().get(i));
            Map<String, String> map = new LinkedHashMap<String, String>();
            int j = 0;
            for (String cell : valueRow) {
                map.put(keys.get(j), cell);
                j++;
            }
            result.add(Collections.unmodifiableMap(map));
        }
        return Collections.unmodifiableList(result);
    }

// Path: kheera-testrunner/src/main/java/gherkin/pickles/PickleCell.java
// public class PickleCell {
//     private final PickleLocation location;
//     private final String value;
// 
//     public PickleCell(PickleLocation location, String value) {
//         this.location = location;
//         this.value = value;
//     }
// 
//     public String getValue() {
//         return value;
//     }
// 
//     public PickleLocation getLocation() {
//         return location;
//     }
// }
// 
// Path: kheera-testrunner/src/main/java/gherkin/pickles/PickleRow.java
// public class PickleRow {
//     private final List<PickleCell> cells;
// 
//     public PickleRow(List<PickleCell> cells) {
//         this.cells = unmodifiableList(cells);
//     }
// 
//     public List<PickleCell> getCells() {
//         return cells;
//     }
// 
// }
// 
// Path: kheera-testrunner/src/main/java/gherkin/pickles/PickleTable.java
// public class PickleTable implements Argument {
// 
//     private final List<PickleRow> rows;
// 
//     public PickleTable(List<PickleRow> rows) {
//         this.rows = unmodifiableList(rows);
//     }
// 
//     public List<PickleRow> getRows() {
//         return rows;
//     }
// 
//     @Override
//     public PickleLocation getLocation() {
//         return rows.get(0).getCells().get(0).getLocation();
//     }
// }


// Path: kheera-testrunner/src/main/java/gherkin/TableConverter.java
import com.google.gson.JsonElement;
import com.google.gson.JsonPrimitive;
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
import java.lang.reflect.TypeVariable;
import java.util.ArrayList;
import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
import de.jodamob.reflect.SuperReflect;
import gherkin.pickles.PickleCell;
import gherkin.pickles.PickleRow;
import gherkin.pickles.PickleTable;

        int count = dataTable.getRows().size();
        if (count == 1) {
            for (PickleCell cell : dataTable.getRows().get(0).getCells()) {
                result.add(replaceWithTestData(testData, cell.getValue()));
            }
        } else {
            for (PickleRow row : dataTable.getRows()) {
                result.add(replaceWithTestData(testData, row.getCells().get(0).getValue()));
            }
        }
        return Collections.unmodifiableList(result);
    }

    static List<Map<String, String>> toMaps(PickleTable dataTable) {
        List<Map<String, String>> result = new ArrayList<Map<String, String>>();
        List<String> keys = raw(dataTable.getRows().get(0));
        int count = dataTable.getRows().size();
        for (int i = 1; i < count; i++) {
            List<String> valueRow = raw(dataTable.getRows().get(i));
            Map<String, String> map = new LinkedHashMap<String, String>();
            int j = 0;
            for (String cell : valueRow) {
                map.put(keys.get(j), cell);
                j++;
            }
            result.add(Collections.unmodifiableMap(map));
        }
        return Collections.unmodifiableList(result);
    }

    private static List<List<String>> raw(PickleTable dataTable) {