private void assertEchoInvocation(String beanName) throws Exception {
EchoLocal echoLocal = lookupEchoLocal(beanName);
Assert.assertEquals(echoLocal.echo(ECHO_WORDS), ECHO_WORDS);
EchoRemote echoRemote = null;
echoRemote = lookupEchoRemote(beanName);
Assert.assertEquals(echoRemote.echo(ECHO_WORDS), ECHO_WORDS);
}
private EchoLocal lookupEchoLocal(String beanName) throws Exception {
return (EchoLocal) localContext.lookup(beanName + "Local");
}