p.put("movieDatabaseUnmanaged.JdbcUrl", "jdbc:hsqldb:mem:moviedb");
p.put("movieDatabaseUnmanaged.JtaManaged", "false");
Context context = new InitialContext(p);
Movies movies = (Movies) context.lookup("MovieBeanLocalHome");
movies.create("Quentin Tarantino", "Reservoir Dogs", 1992);
movies.create("Joel Coen", "Fargo", 1996);
movies.create("Joel Coen", "The Big Lebowski", 1998);
Collection<Movie> list = movies.findAll();
assertEquals("Collection.size()", 3, list.size());
for (Movie movie : list) {
movies.remove(movie.getPrimaryKey());
}
assertEquals("Movies.findAll()", 0, movies.findAll().size());
}