@Test
public void testSchema() throws ParseException {
System.out.println(schema);
// test 1st level schema;
ColumnSchema f1 = schema.getColumn(0);
Assert.assertEquals("c", f1.getName());
Assert.assertEquals(ColumnType.COLLECTION, f1.getType());
ColumnSchema f2 = schema.getColumn(1);
Assert.assertEquals("m1", f2.getName());
Assert.assertEquals(ColumnType.MAP, f2.getType());
// test 2nd level schema;
Schema f1Schema = f1.getSchema();
ColumnSchema f11 = f1Schema.getColumn(0);
Assert.assertEquals("r", f11.getName());
Assert.assertEquals(ColumnType.RECORD, f11.getType());
Schema f2Schema = f2.getSchema();
ColumnSchema f21 = f2Schema.getColumn(0);
// Assert.assertEquals("", f21.getName());
Assert.assertEquals(ColumnType.INT, f21.getType());
// test 3rd level schema;
Schema f11Schema = f11.getSchema();
ColumnSchema f111 = f11Schema.getColumn(0);
Assert.assertEquals("r", f111.getName());
Assert.assertEquals(ColumnType.RECORD, f111.getType());
ColumnSchema f112 = f11Schema.getColumn(1);
Assert.assertEquals("f2", f112.getName());
Assert.assertEquals(ColumnType.MAP, f112.getType());
// test 4th level schema;
Schema f111Schema = f111.getSchema();
ColumnSchema f1111 = f111Schema.getColumn(0);
Assert.assertEquals("f1", f1111.getName());
Assert.assertEquals(ColumnType.INT, f1111.getType());
ColumnSchema f1112 = f111Schema.getColumn(1);
Assert.assertEquals("f2", f1112.getName());
Assert.assertEquals(ColumnType.INT, f1112.getType());
Schema f112Schema = f112.getSchema();
ColumnSchema f1121 = f112Schema.getColumn(0);
// Assert.assertEquals("", f1121.getName());
Assert.assertEquals(ColumnType.BYTES, f1121.getType());
}