assertEquals(Integer.valueOf(arg), il.exec(t));
}
@Test
public void testArrayConversion() throws SecurityException, ClassNotFoundException, NoSuchMethodException, IOException {
InvokeForInt ii = new InvokeForInt(TestInvoker.class.getName() + ".avg", "double[]");
DataBag nums = newSimpleBag(1.0, 2.0, 3.0);
assertEquals(Integer.valueOf(2), ii.exec(tf_.newTuple(nums)));
ii = new InvokeForInt(TestInvoker.class.getName() + ".avg", "long[]");
nums = newSimpleBag(1L, 2L, 3L);
assertEquals(Integer.valueOf(2), ii.exec(tf_.newTuple(nums)));
InvokeForString is = new InvokeForString(TestInvoker.class.getName() + ".concatStringArray", "string[]");
DataBag strings = newSimpleBag("foo", "bar", "baz");
assertEquals("foobarbaz", is.exec(tf_.newTuple(strings)));
}