From: Erik Brakkee Date: Sat, 24 Jul 2010 00:11:04 +0000 (+0000) Subject: (no commit message) X-Git-Tag: wamblee-utils-0.7~184 X-Git-Url: http://wamblee.org/gitweb/?a=commitdiff_plain;h=244dea78bca6dd782c550387e72b436bf2210182;p=utils --- 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);