@Test
public void testQuery() throws Exception {

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