@Test
public void testSchema2() throws Exception {

    Schema t = new Schema();
    Schema b = new Schema();
    t.add(new FieldSchema("x", DataType.CHARARRAY));
    t.add(new FieldSchema("y", DataType.INTEGER));
    b.add(new FieldSchema("A", t, DataType.TUPLE));
    Schema in = new Schema(new FieldSchema("", b, 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());
}