public void test1() throws Throwable
{
Serializable id = container.getSessionFactory().createSession(new Class[] { }, new Object[] { });
Method method = MyStateful.class.getMethod("getBusinessObject");
MyStateful bean = (MyStateful) container.invoke(id, MyStateful.class, method, null);
MyStatefulBean.barrier.await(5000, TimeUnit.MILLISECONDS);
assertEquals(0, MyStatefulBean.activations);
assertEquals(1, MyStatefulBean.passivations);
MyStateful bean2 = bean.getBusinessObject();
assertEquals(1, MyStatefulBean.activations);
assertEquals(bean, bean2);
}