@Test
public void testSecondShort() throws Exception {

    Stitch func = new Stitch();
    DataBag b1 = BagFactory.getInstance().newDefaultBag();
    Tuple t = TupleFactory.getInstance().newTuple();
    t.append("a");
    t.append("b");
    b1.add(t);
    t = TupleFactory.getInstance().newTuple();
    t.append("c");
    t.append("d");
    b1.add(t);
    
    DataBag b2 = BagFactory.getInstance().newDefaultBag();
    t = TupleFactory.getInstance().newTuple();
    t.append("1");
    t.append("2");
    b2.add(t);
    t = TupleFactory.getInstance().newTuple();
    t.append(b1);
    t.append(b2);
    DataBag out = func.exec(t);
    assertEquals(2, out.size());
    Iterator<Tuple> iter = out.iterator();
    t = iter.next();
    assertEquals(4, t.size());
    assertEquals("a", t.get(0));
    assertEquals("b", t.get(1));
    assertEquals("1", t.get(2));
    assertEquals("2", t.get(3));
    t = iter.next();
    assertEquals(2, t.size());
    assertEquals("c", t.get(0));
    assertEquals("d", t.get(1));
}