// get the first foo based on strict search
fooer = new MyFooContainer();
fooer.setFoo("oneFooer");
searchObject.setFooContainer(fooer);
fooableowners = persist.getObjects(FooContainerOwner.class, new Equal(searchObject));
assertEquals(1, fooableowners.size());
// get second foo based on strict search
extfooer = new MyExtendedFooContainer();
extfooer.setFoo("twoFooer");
searchObject.setFooContainer(extfooer);
fooableowners = persist.getObjects(FooContainerOwner.class, new Equal(searchObject));
assertEquals(1, fooableowners.size());
// check that second foo can't be gotten by strict search
fooer.setFoo("twoFooer");
searchObject.setFooContainer(fooer);
fooableowners = persist.getObjects(FooContainerOwner.class, new Equal(searchObject));
assertEquals(0, fooableowners.size());
// get second foo based on non-strict search
fooableowners = persist.getObjects(FooContainerOwner.class, new Equal(searchObject, false));
assertEquals(1, fooableowners.size());
// check that the first foo can't be gotten by strict search
extfooer.setFoo("oneFooer");
searchObject.setFooContainer(extfooer);
fooableowners = persist.getObjects(FooContainerOwner.class, new Equal(searchObject));
assertEquals(0, fooableowners.size());
// get first foo based on non-strict search
fooableowners = persist.getObjects(FooContainerOwner.class, new Equal(searchObject, false));
assertEquals(1, fooableowners.size());
persist.close();
}