MockEjb3Deployment deployment = new MockEjb3Deployment(new MockDeploymentUnit());
Ejb3DescriptorHandler handler = new Ejb3DescriptorHandler(deployment, metaData);
List<Container> containers = handler.getContainers(deployment, new HashMap<String, Container>());
EJBContainer container = (EJBContainer) containers.get(0);
Stateful annotation = ((EJBContainer) containers.get(0)).getAnnotation(Stateful.class);
assertNotNull("Can't find annotation @Stateful on the container", annotation);
//ApplicationException ex = container.getAnnotation(ApplicationException.class, DummyException.class);
ApplicationException ex = ExtendedAdvisorHelper.getExtendedAdvisor(container.getAdvisor()).resolveAnnotation(DummyException.class, ApplicationException.class);
assertNotNull("Can't find annotation @ApplicationException in the meta data", ex);
}