"org.apache.harmony.jndi.tests.javax.naming.spi.dummy", ctxEnv);
Attributes a = new BasicAttributes();
try {
NamingManagerTest.indicateNullPointerException(ctxEnv);
DirectoryManager.getObjectInstance(r,
new CompositeName("compositename"), new MockContext(
ctxEnv), ctxEnv, a);
fail("Should throw NamingException.");
} catch (NamingException e) {
assertTrue(e.getRootCause() instanceof NullPointerException);
}
// test Referenceable
MockReferenceable mr = new MockReferenceable(r);
try {
NamingManagerTest.indicateNamingException(ctxEnv);
DirectoryManager
.getObjectInstance(mr, new CompositeName(
"compositename"), new MockContext(ctxEnv),
ctxEnv, a);
fail("Should throw NamingException.");
} catch (NamingException e) {
assertNull(e.getRootCause());
}