From eeddd771b557b280128b940334c4ce6d84654853 Mon Sep 17 00:00:00 2001 From: Erik Brakkee Date: Thu, 29 Jul 2010 21:54:30 +0000 Subject: [PATCH] --- .../org/wamblee/wicket/page/WebApplicationBasePageTest.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java b/wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java index ec7b9e3b..1ee8cef8 100644 --- a/wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java +++ b/wicket/components/src/test/java/org/wamblee/wicket/page/WebApplicationBasePageTest.java @@ -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); -- 2.31.1