From a2573481b6c3c3a274c7644931f3c55b054c26f5 Mon Sep 17 00:00:00 2001 From: erik Date: Sat, 24 Jul 2010 00:11:04 +0000 Subject: [PATCH] --- .../wamblee/wicket/behavior/WebApplicationBasePageTest.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/wicket/components/src/test/java/org/wamblee/wicket/behavior/WebApplicationBasePageTest.java b/wicket/components/src/test/java/org/wamblee/wicket/behavior/WebApplicationBasePageTest.java index a89d6994..0dfa090b 100644 --- a/wicket/components/src/test/java/org/wamblee/wicket/behavior/WebApplicationBasePageTest.java +++ b/wicket/components/src/test/java/org/wamblee/wicket/behavior/WebApplicationBasePageTest.java @@ -22,6 +22,8 @@ import static org.mockito.Mockito.*; import java.lang.reflect.Field; import javax.persistence.EntityManager; +import javax.transaction.Status; +import javax.transaction.UserTransaction; import org.apache.wicket.IPageMap; import org.apache.wicket.PageParameters; @@ -161,6 +163,7 @@ public class WebApplicationBasePageTest { public void testSmokeBehaviorFlushEntityManager() throws Exception { WebApplicationBasePage page = new WebApplicationBasePage(mock(IPageMap.class), new PageParameters()); EntityManager entityManager = mock(EntityManager.class); + when(entityManager.isOpen()).thenReturn(true); PageBehavior behavior = new FlushEntityManagerBehavior(entityManager); page.addBehavior(behavior); wicket.startPage(page); -- 2.31.1