public void test() {
   ExpressionBuilder eb = new ExpressionBuilder();
   ReportQuery rq = new ReportQuery(Employee.class, eb);
   rq.addAttribute("firstName");
   rq.addAttribute("lastName");
   Expression exp = eb.getFunction("dbms_random.value");
   exp.setSelectIfOrderedBy(false);
   rq.addOrdering(exp.ascending());
   rq.setSelectionCriteria(eb.anyOf("projects").get("teamLeader").isNull());
   results = (Vector) getSession().executeQuery(rq);
 }
 public void run() {
   try {
     ExpressionBuilder builder = new ExpressionBuilder();
     Expression exp = builder.anyOf("policies").get("policyNumber").equal(200);
     for (int i = 0; i < 1; i++) {
       PolicyHolder holder =
           (PolicyHolder)
               this.clientSession.readObject(
                   org.eclipse.persistence.testing.models.insurance.PolicyHolder.class, exp);
       if ((holder == null)
           || (holder.getFirstName() == "")
           || (holder.getPolicies() == null)
           || (holder.getAddress() == null)
           || (holder.getAddress().getCity() == null)) {
         throw new TestWarningException("Client/Server dead lock test fails as null is returned.");
       }
     }
   } catch (Exception exception) {
     this.server.errorOccured = true;
     exception.printStackTrace(System.out);
   }
 }