public void testSerializeSingleTupleBag() throws Exception {
Tuple t = Util.createTuple(new String[] {"foo", "bar", "baz"});
DataBag stBag = new SingleTupleBag(t);
PipedOutputStream pos = new PipedOutputStream();
DataOutputStream dos = new DataOutputStream(pos);
PipedInputStream pis = new PipedInputStream(pos);
DataInputStream dis = new DataInputStream(pis);
stBag.write(dos);
DataBag dfBag = new DefaultDataBag();
dfBag.readFields(dis);
assertTrue(dfBag.equals(stBag));