Object bean = RemoteAccessTestCase.getContext().lookup(JNDI_NAME_SLSB_REMOTE);
assertTrue("Bean was not of expected type " + MyStatelessRemote.class.getName() + " but was instead " + bean,
bean instanceof MyStatelessRemote);
MyStatelessRemote slsb = ((MyStatelessRemote) bean);
String result = slsb.sayHi("testRemote");
String expected = "Hi testRemote";
assertEquals("Result was not expected", expected, result);
result = slsb.sayHi("testRemote");
expected = "Hi testRemote";
assertEquals("Result was not expected", expected, result);