@Test
public void testCall() throws Exception {

    for (int i = 0; i < DB_MODE; i++) {
        BatchCallBuilder cb = new BatchCallBuilder(SP_WITHOUT_OUT_PARAM);
        cb.registerInput("v_id", JDBCType.INTEGER);
        cb.registerInput("v_cityID", JDBCType.INTEGER);
        cb.registerInput("v_countryID", JDBCType.INTEGER);
        cb.registerInput("v_name", JDBCType.VARCHAR);
        cb.hints().inShard(i);
        cb.addBatch(7, 7, 7, "777");
        cb.addBatch(17, 17, 17, "1777");
        cb.addBatch(27, 27, 27, "2777");
        int[] ret = dao.batchCall(cb);
        assertArrayEquals(new int[]{1, 1, 1}, ret);
        Person p = new Person();
        p.setPeopleID(7);
        p = dao.queryByPk(p, Hints.hints().inShard(i));
        assertEquals("777", p.getName());
        p = new Person();
        p.setPeopleID(17);
        p = dao.queryByPk(p, Hints.hints().inShard(i));
        assertEquals("1777", p.getName());
        p = new Person();
        p.setPeopleID(27);
        p = dao.queryByPk(p, Hints.hints().inShard(i));
        assertEquals("2777", p.getName());
    }
}