public class JndiRegistryTest extends TestCase {
public void testLookupByType() throws Exception {
JndiRegistry jndi = new JndiRegistry(JndiTest.createInitialContext());
jndi.bind("foo", new SimpleLanguage());
jndi.bind("bar", "Hello bar");
assertEquals("Hello bar", jndi.lookup("bar"));
assertEquals("Hello bar", jndi.lookupByName("bar"));
assertEquals("Hello bar", jndi.lookupByNameAndType("bar", String.class));