title: What is the best way to unit test a EJB3 component without having to deploy the component
body: <p>I would like to have a JUnit (or other) system where the enterprise beans can be tested in a mock environment so that all resources/beans and so on are injected locally. The enterprise beans should not have to accomplish this. All kinds of injection should be supported.</p>
  
  <ul>
  <li>I would like to have a maven plugin for this so that the tests can be run from a maven build. </li>
  <li>Transactions are not necessary during the unit tests,this would require a complete
  container.</li>
  </ul>
  
  <p>Do you know of such a maven plugin or test framework? Experiences with it?</p>