Traditional test approach in J2EE 6 is tough. In J2EE 6, we have bean injection. The Bean by design is created by framework and not by tester. Given the resource injection and persistence, a test setup can be difficulty and easy to break. At least, I tried two days with embedded EJBContainer and did not succeed. Finally, I got this absolutely wonderful test framework for J2EE: Jboss arquillian. Before you tweak anything, you have to check this out.