String expected = "{\"bag\":[[{\"first\":\"one\",\"second\":\"two\",\"third\":\"three\"}]," +
"[{\"first\":\"one\",\"second\":\"two\",\"third\":\"three\"}]," +
"[{\"first\":\"one\",\"second\":\"two\",\"third\":\"three\"}]]}";
Tuple tuple = TupleFactory.getInstance().newTuple(Arrays.asList(new String[] { "one", "two", "three" }));
assertThat(pigTypeToJson(createTuple(new DefaultDataBag(Arrays.asList(new Tuple[] { tuple, tuple, tuple })),
createSchema("bag: {t:(first:chararray, second:chararray, third: chararray)}"))), is(expected));
}