Dog dog = new Dog();
dog.setRegistrationNumber("DOGGIE");
Ebean.save(dog);
AnimalShelter shelter = new AnimalShelter();
shelter.setName("My Animal Shelter");
shelter.getAnimals().add(cat);
shelter.getAnimals().add(dog);
Ebean.save(shelter);
AnimalShelter shelter2 = Ebean.find(AnimalShelter.class, shelter.getId());
List<Animal> animals = shelter2.getAnimals();
BeanList<?> beanList = (BeanList<?>)animals;
ModifyListenMode modifyListenMode = beanList.getModifyListenMode();
Assert.assertNotNull(modifyListenMode);