(no commit message)
authorErik Brakkee <erik@brakkee.org>
Thu, 29 Jul 2010 21:54:30 +0000 (21:54 +0000)
committerErik Brakkee <erik@brakkee.org>
Thu, 29 Jul 2010 21:54:30 +0000 (21:54 +0000)
wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java

index ec7b9e3bfe73fa536d8b4b4890a8a84af09f0494..1ee8cef883e192fbbe9c2d8cbdf3a10b2c2bab2b 100644 (file)
@@ -199,9 +199,11 @@ public class WebApplicationBasePageTest {
     public void testSmokeBehaviorFlushEntityManager() throws Exception {
         WebApplicationBasePage page = new WebApplicationBasePage(
             mock(IPageMap.class), new PageParameters());
-        EntityManager entityManager = mock(EntityManager.class);
+        final EntityManager entityManager = mock(EntityManager.class);
         when(entityManager.isOpen()).thenReturn(true);
-        PageBehavior behavior = new FlushEntityManagerBehavior(entityManager);
+        PageBehavior behavior = new FlushEntityManagerBehavior() { 
+            public EntityManager getEntityManager() { return entityManager; } 
+        };
         page.addBehavior(behavior);
         wicket.startPage(page);
         wicket.assertRenderedPage(WebApplicationBasePage.class);