One problem I'm currently seeing with the WebIntegrationUnitTestCase is that we are scanning for annotations too aggressively, for example, even when the war has a 2.4 or earlier web.xml descriptor. I supposed we should simply assume a metadata complete deployment for any web.xml 2.4 or earlier.
The other problem that shows up because of this is that its very easy for mappedName collisions. Unlike the ejb component model where the enc is component local, the web component enc annotations are affecting the common web application enc. I can see its very easy for resources to be locally defined on a servlet and collide with annotations coming from the xml layer. Currently the annotation mappedNames are overwriting any existing xml metadata jndi-name/mapped-names without warning. In the case of the WebIntegrationUnitTestCase the annotations should not be processed and doing so does end up resulting in failures.
http://jira.jboss.com/jira/browse/JBAS-5586 is for the metadata complete behavior. Need to look into what appears to be a bug with an annotation mappedName overwriting an xml jndi-name.