@Test
public void testSumLong() throws Exception {

    Over func = new Over();
    DataBag inbag = BagFactory.getInstance().newDefaultBag();
    for (int i = 0; i < 10; i++) {
        Tuple t = TupleFactory.getInstance().newTuple(1);
        t.set(0, 1L);
        inbag.add(t);
    }
    Tuple t = TupleFactory.getInstance().newTuple(4);
    t.set(0, inbag);
    t.set(1, "sum(long)");
    t.set(2, -1);
    t.set(3, -1);
    DataBag outbag = func.exec(t);
    assertEquals(10, outbag.size());
    for (Tuple to : outbag) {
        assertEquals(1, to.size());
        assertEquals(new Long(10), to.get(0));
    }
}