@Test
public void testBatchQueryBuilder() throws Exception {

    PersonDefinition p = Person.PERSON;
    BatchQueryBuilder batchBuilder = new BatchQueryBuilder();
    for (int k = 0; k < TABLE_MODE; k++) {
        batchBuilder.addBatch(selectAllFrom(p).where().allOf(p.PeopleID.eq(k+1)).orderBy(p.PeopleID.asc()).into(Person.class));
    }
    Hints hints = batchBuilder.hints().diagnose();
    List<List<Person>> plist = (List<List<Person>>)dao.batchQuery(batchBuilder);
    if(this.dbCategory == SqlServer) { //"WITH (NOLOCK)" is applied for SqlServer automatically
        assertTrue(hints.getDiagnose().toString().contains(SegmentConstants.WITH_NO_LOCK.getText()));
    }
    assertEquals(TABLE_MODE, plist.size());
    for (int k = 0; k < TABLE_MODE; k++) {
        List<Person> list = plist.get(k);
        assertEquals(1, list.size());
        Person pk = list.get(0);
        assertNotNull(p);
        assertEquals(k+1,  pk.getPeopleID().intValue());
        assertEquals("test",  pk.getName());
    }
}