@Test
public void testBadInput() throws Exception {

    Stitch func = new Stitch();
    boolean caught = false;
    Tuple t = TupleFactory.getInstance().newTuple();
    t.append("Mary had a little lamb");
    try {
        func.exec(t);
    } catch (ExecException ee) {
        caught = true;
    }
    assertTrue(caught);
    DataBag b = BagFactory.getInstance().newDefaultBag();
    b.add(t);
    t = TupleFactory.getInstance().newTuple();
    t.append(b);
    t.append("its fleece was white as snow");
    caught = false;
     try {
        func.exec(t);
    } catch (ExecException ee) {
        caught = true;
    }
    assertTrue(caught);
}