row.add("cf", "f1", "v1".getBytes());
Object obj = serde.deserialize(row);
assertTrue(obj instanceof LazyAccumuloRow);
LazyAccumuloRow lazyRow = (LazyAccumuloRow) obj;
Object field0 = lazyRow.getField(0);
assertNotNull(field0);
assertTrue(field0 instanceof LazyStruct);
LazyStruct struct = (LazyStruct) field0;
List<Object> fields = struct.getFieldsAsList();
assertEquals(3, fields.size());
for (int i = 0; i < fields.size(); i++) {
assertEquals(LazyString.class, fields.get(i).getClass());
assertEquals("p" + (i + 1), fields.get(i).toString());
}
Object field1 = lazyRow.getField(1);
assertNotNull(field1);
assertTrue("Expected instance of LazyString but was " + field1.getClass(),
field1 instanceof LazyString);
assertEquals(field1.toString(), "v1");
}