@Test
public void testSchema() throws Exception {

    Schema s = new Schema();
    Schema in = new Schema();
    s.add(new FieldSchema("x", DataType.CHARARRAY));
    s.add(new FieldSchema("y", DataType.INTEGER));
    in.add(new FieldSchema("A", s, DataType.BAG));
    FieldSchema fs = new FieldSchema("Over",
            new Schema(Schema.generateNestedSchema(DataType.BAG,
                    DataType.NULL)), DataType.BAG);
    in.add(fs);
    Stitch func = new Stitch();
    Schema out = func.outputSchema(in);
    assertEquals("{stitched: {x: chararray,y: int,{NULL}}}", out.toString());
}