The use of an inner-class annotated as an EJB can get you all the resources you may need to run your test case such as a UserTransaction, EntityManager, JMS Topic or Queue, DataSource, references to other EJBs, etc. Simply add a META-INF/ejb-jar.xml to your test sources and start annotating your inner class as needed.
...