5859606162636465
protected abstract String getEjbName(); protected MyStateless21 getRemoteView() throws Exception { MyStateless21Home home = lookup(getEjbName() + "/home", MyStateless21Home.class); MyStateless21 bean = home.create(); return bean; }
6566676869707172
} @Test public void testCreate() throws Exception { MyStateless21 bean = getRemoteView(); assertNotNull(bean); }
72737475767778798081
} @Test public void testInvocation() throws Exception { MyStateless21 bean = getRemoteView(); String now = new Date().toString(); String actual = bean.sayHi(now); assertEquals("Hi " + now, actual); }
818283848586878889
} @Test public void testGetHandle() throws Exception { MyStateless21 bean = getRemoteView(); Handle handle = bean.getHandle(); assertNotNull(handle); }