@Test
public void testQueryBySamplePage() throws Exception {

    for(int j = 0; j < TABLE_MODE;j++) {
        List<Person> plist;
        Person pk = new Person();
        pk.setName("test");
        plist = dao.queryBySample(pk, PageRange.atPage(1, 10, p.PeopleID));
        assertList(4, plist);
        
        plist = dao.queryBySample(pk, PageRange.atPage(2, 2, p.CityID, p.CountryID));
        assertList(2, plist);
        
        if(dbCategory == DatabaseCategory.MySql) {
            plist = dao.queryBySample(pk, PageRange.atPage(3, 2));
            assertList(0, plist);
        }
    
        plist = dao.queryBySample(pk, PageRange.atPage(1, 10, p.PeopleID.asc()));
        assertList(4, plist);
        assertOrder(plist, true);
        
        plist = dao.queryBySample(pk, PageRange.atPage(1, 10, p.PeopleID.desc()));
        assertList(4, plist);
        assertOrder(plist, false);
        
        plist = dao.queryBySample(pk, PageRange.atPage(1, 10, p.PeopleID.asc(), p.CityID.desc()));
        assertList(4, plist);
        assertOrder(plist, true);
    }
}