(no commit message)
authorErik Brakkee <erik@brakkee.org>
Sat, 24 Jul 2010 00:11:04 +0000 (00:11 +0000)
committerErik Brakkee <erik@brakkee.org>
Sat, 24 Jul 2010 00:11:04 +0000 (00:11 +0000)
wicket/components/src/test/java/org/wamblee/wicket/behavior/WebApplicationBasePageTest.java

index a89d6994f37843ca82d8b747fd8d6d3462d63e8e..0dfa090b5d3cfb462f22ccb790c91f645785640b 100644 (file)
@@ -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);