parser = new TableSchemaParser(new StringReader(strSch));
schema = parser.RecordSchema(null);
System.out.println(schema);
// test 1st level schema;
ColumnSchema f1 = schema.getColumn(0);
Assert.assertEquals("r1", f1.getName());
Assert.assertEquals(ColumnType.RECORD, f1.getType());
ColumnSchema f2 = schema.getColumn(1);
Assert.assertEquals("r2", f2.getName());
Assert.assertEquals(ColumnType.RECORD, f2.getType());
// test 2nd level schema;
Schema f1Schema = f1.getSchema();
ColumnSchema f11 = f1Schema.getColumn(0);
Assert.assertEquals("f1", f11.getName());
Assert.assertEquals(ColumnType.INT, f11.getType());
ColumnSchema f12 = f1Schema.getColumn(1);
Assert.assertEquals("f2", f12.getName());
Assert.assertEquals(ColumnType.INT, f12.getType());
Schema f2Schema = f2.getSchema();
ColumnSchema f21 = f2Schema.getColumn(0);
Assert.assertEquals("r3", f21.getName());
Assert.assertEquals(ColumnType.RECORD, f21.getType());
// test 3rd level schema;
Schema f21Schema = f21.getSchema();
ColumnSchema f211 = f21Schema.getColumn(0);
Assert.assertEquals("f3", f211.getName());
Assert.assertEquals(ColumnType.FLOAT, f211.getType());
ColumnSchema f212 = f21Schema.getColumn(1);
Assert.assertEquals("f4", f212.getName());
Assert.assertEquals(ColumnType.BYTES, f212.getType());
}