@Test
public void testQueryWithLock() throws Exception {

    PersonDefinition p = Person.PERSON;
    SqlBuilder builder = selectAllFrom(p).withLock().into(Person.class);
    Hints hints = builder.hints().diagnose();
    List<Person> plist = dao.query(builder);
    if(this.dbCategory == SqlServer) { //check withLock()
        assertFalse(hints.getDiagnose().toString().contains(SegmentConstants.WITH_NO_LOCK.getText()));
    }
    assertFalse(plist.isEmpty());//withLock() will be ignored for MySQL
}