@Test public void testGetOwnedDevices() { Transaction tx = schema.connect(null); Person owner; Iterable<Device> devQuery; owner = tx.retrieve("Person", "1"); devQuery = tx.query("Device", new IQuery("owner", owner)); Device d1, d2; d1 = devQuery.iterator().next(); d2 = Persons.getOwnedDevices(tx, owner).iterator().next(); Assert.assertSame(d1, d2); }