Hi, I have want to test some internal used beans which access entity beans. The problem is now, that the unit test wants to test a service which return an entity. This entity has a colelction member, something like this:
@Entity Class A { Private List<B> bs; public List<B> getBs() { return bs; } ... } The collection bs is lazy initialized and should be. So, if I want to access the bs from the returned entity instance A, I get a LazyInitializationException. How can I test internal used services? Is there a godd way to do this? Until now I have only tested Beans which return transfer objects, but know this would be necessary. WBR, Karsten