@Test
public void testPuTypesafe() throws Exception {
List<Movie> movies = bean.listMovies();
assertFalse(movies.isEmpty());
assertNotNull(defaultEM);
List<Movie> defaultFindAll = defaultEM.createNamedQuery("Movie.findAll", Movie.class).getResultList();
assertFalse(defaultFindAll.isEmpty());
assertArrayEquals(movies.toArray(), defaultFindAll.toArray());
List<Movie> persistenceContextFindAll =
persistenceContextEM.createNamedQuery("Movie.findAll", Movie.class).getResultList();
assertArrayEquals(movies.toArray(), persistenceContextFindAll.toArray());
}