Assert.assertNull(foundPerson);
}
@Test
public void testQuery() {
AddressCouchOTM address1 = new AddressCouchOTM();
address1.setAddressId("a");
address1.setStreet("sector 11");
AddressCouchOTM address2 = new AddressCouchOTM();
address2.setAddressId("b");
address2.setStreet("sector 12");
Set<AddressCouchOTM> addresses = new HashSet<AddressCouchOTM>();
addresses.add(address1);
addresses.add(address2);
PersonCouchOTM person = new PersonCouchOTM();
person.setPersonId("1");
person.setPersonName("Kuldeep");
person.setAddresses(addresses);
em.persist(person);
PersonCouchOTM person1 = new PersonCouchOTM();
person1.setPersonId("2");
person1.setPersonName("KK");
address1.setAddressId("a1");
address1.setStreet("Sector a1");
address2.setAddressId("a2");
address2.setStreet("Sector a2");
AddressCouchOTM address3 = new AddressCouchOTM();
address3.setAddressId("a3");
address3.setStreet("Sector a3");
addresses = new HashSet<AddressCouchOTM>();
addresses.add(address1);
addresses.add(address2);
addresses.add(address3);