@Test
public void testAppendDataRows() throws Exception {

    List<String> stringList = new ArrayList<>();
    stringList.add("apple");
    stringList.add("banana");
    MockCollector collector = new MockCollector();
    ModelConverterUtils.appendDataRows(stringList, collector, 2);
    Row row1 = collector.buffer.get(0);
    Assert.assertEquals(row1.getArity(), 2);
    Assert.assertEquals(row1.getField(0), ModelConverterUtils.MAX_NUM_SLICES);
    Assert.assertEquals(row1.getField(1), "apple");
    Row row2 = collector.buffer.get(1);
    Assert.assertEquals(row2.getArity(), 2);
    Assert.assertEquals(row2.getField(0), 2 * ModelConverterUtils.MAX_NUM_SLICES);
    Assert.assertEquals(row2.getField(1), "banana");
}