try{
Object obj = initialContext.lookup("client/tests/stateful/EncBean");
EncStatefulHome home = (EncStatefulHome)javax.rmi.PortableRemoteObject.narrow( obj, EncStatefulHome.class);
assertNotNull("The EJBHome returned from JNDI is null", home);
EJBMetaData expected = home.getEJBMetaData();
assertNotNull("The EJBMetaData returned is null", expected);
ObjectGraph graph = ejbObject.returnObjectGraph(new ObjectGraph(expected));
assertNotNull("The ObjectGraph is null", graph);
EJBMetaData actual = (EJBMetaData)graph.getObject();
assertNotNull("The EJBMetaData returned is null", actual);
assertEquals(expected.getHomeInterfaceClass(), actual.getHomeInterfaceClass());
assertEquals(expected.getRemoteInterfaceClass(), actual.getRemoteInterfaceClass());
} catch (Exception e){
fail("Received Exception "+e.getClass()+ " : "+e.getMessage());
}
}