Use an integration test.
My project was created using seam gen. My tests are alreay running inside the embedded container, so how do I set the application context? I found this article here:
But am not clear on how this would work with the EntityQuery.
Do your work inside a FacesRequest.