@Test public void run() throws Exception { movies.deleteAll(); runner.reset(); final Movie movie = new Movie(); movie.setTitle("Bad Boys"); movie.setDirector("Michael Bay"); movie.setYear(1995); runner.run(movie); assertEquals(1, moviesDirect.count()); final Movie storedMovie = runner.find(); assertNotNull(storedMovie); }
public void run(Movie movie) { if (before) { addXaResource(); } em.persist(movie); if (!before) { addXaResource(); } }
MoviesXA { public void run(Movie movie) { if (before) { addXaResource(); } em.persist(movie); if (!before) { addXaResource(); } } }
MoviesXA { public void run(Movie movie) { if (before) { addXaResource(); } em.persist(movie); if (!before) { addXaResource(); } }  }
MoviesXA { public void run(Movie movie) { if (before) { addXaResource(); } em.persist(movie); if (!before) { addXaResource(); } }  void run(Movie movie); Movie find(); void fail(); void reset(); void before(); }
MoviesXA { public void run(Movie movie) { if (before) { addXaResource(); } em.persist(movie); if (!before) { addXaResource(); } }  void run(Movie movie); Movie find(); void fail(); void reset(); void before();  }