}
@Test (groups="reads")
public void testSuccess() {
long time = System.currentTimeMillis();
PetClinicInquiry inquiry = new PetClinicInquiry();
inquiry.setName("inq1");
inquiry.setBb("ticky" + time);
petClinicInquiryDao.store(inquiry);
PetClinicLead lead = new PetClinicLead();
lead.setInquiry(inquiry);
lead.setName("golden boy" + time);
petClinicLeadDao.store(lead);
List<Object[]> results = petClinicLeadDao.find(Select.select(Select.select("inquiry")),
Join.join(Join.entityJoin("PetClinicInquiry", "inquiry")),
null,
0,
1000,
Comparison.eq("inquiry.bb", true, "ticky" + time));
Object[] objects = results.get(0);
lead = (PetClinicLead) objects[0];
inquiry = (PetClinicInquiry) objects[1];
assertEquals("golden boy" + time, lead.getName());
assertEquals("inq1", inquiry.getName());
//SELECT o, inquiry FROM PetClinicLead o, PetClinicInquiry inquiry WHERE inquiry.bb = :inquiry_bb
petClinicLeadDao.delete(lead);
petClinicInquiryDao.delete(inquiry);