spring-framework / org.springframework.mock.jndi / ExpectedLookupTemplate / lookup

lookup

open fun lookup(name: String): Any

If the name is the expected name specified in the constructor, return the object provided in the constructor. If the name is unexpected, a respective NamingException gets thrown.