assertEquals("foobar".replace("oo", "aa"), replace.exec(testTuple));
}
@Test
public void testTrim() throws IOException {
TRIM trim = new TRIM();
Tuple testTuple = Util.buildTuple("nospaces");
assertEquals("nospaces".trim(), trim.exec(testTuple));
testTuple = Util.buildTuple("spaces right ");
assertEquals("spaces right", trim.exec(testTuple));
testTuple = Util.buildTuple(" spaces left");
assertEquals("spaces left", trim.exec(testTuple));
testTuple = Util.buildTuple(" spaces both ");
assertEquals("spaces both", trim.exec(testTuple));
testTuple = TupleFactory.getInstance().newTuple();
assertNull(trim.exec(testTuple));
}