protected void query() {
tx = session.currentTransaction();
tx.begin();
QueryBuilder builder = session.getQueryBuilder();
QueryDomainType dobj = builder.createQueryDefinition(NotPersistentTypes.class);
dobj.where(dobj.get("id").equal(dobj.param("id")));
Query query = session.createQuery(dobj);
query.setParameter("id", 0);
List<NotPersistentTypes> result = query.getResultList();
int resultSize = result.size();
errorIfNotEqual("Wrong query result size", 1, resultSize);