@Override @Test (dependsOnMethods = { "read", "create" }) public void delete () { long id = 1; Eviction eviction = dao.read (id); Set<Product> ps = eviction.getProducts (); Hibernate.initialize (ps); dao.delete (eviction); assertEquals (dao.count (), (howMany () - 1)); assertNull (dao.read (id)); for (Product p : ps) { assertNotNull (pdao.read (p.getId ())); } }
public Set<Product> getProducts () { Eviction eviction = getEviction (); return eviction.getProducts (); }
EvictionDao extends HibernateDao<Eviction, Long> implements
      IEvictionDao { public Set<Product> getProducts () { Eviction eviction = getEviction (); return eviction.getProducts (); } }
EvictionDao extends HibernateDao<Eviction, Long> implements
      IEvictionDao { public Set<Product> getProducts () { Eviction eviction = getEviction (); return eviction.getProducts (); }  }
EvictionDao extends HibernateDao<Eviction, Long> implements
      IEvictionDao { public Set<Product> getProducts () { Eviction eviction = getEviction (); return eviction.getProducts (); }  Eviction getFactoryDefault(); Eviction getEviction(); void update(EvictionStrategy strategy, int keep_period,
      int max_disk_usage); void setProducts(Set<Product> products); Set<Product> getProducts(); void removeProduct(Product product); }
EvictionDao extends HibernateDao<Eviction, Long> implements
      IEvictionDao { public Set<Product> getProducts () { Eviction eviction = getEviction (); return eviction.getProducts (); }  Eviction getFactoryDefault(); Eviction getEviction(); void update(EvictionStrategy strategy, int keep_period,
      int max_disk_usage); void setProducts(Set<Product> products); Set<Product> getProducts(); void removeProduct(Product product);  }