"org.apache.harmony.jndi.tests.javax.naming.spi.mock.MockLdapContextFactory");
Control[] cs = { new MyControl("c1", new byte[] { 1, 2, 3, 4 }, false),
new MyControl("c1", new byte[] { 'a', 'b', 'c', 'd' }, true), };
MyInitialLdapContext ctx = new MyInitialLdapContext(env, cs);
MockLdapContext defaultCtx = (MockLdapContext) ctx.getDefaultContext();
Object objCs = defaultCtx.getProps().get(
"java.naming.ldap.control.connect");
Object version = defaultCtx.getProps().get("java.naming.ldap.version");
assertNotNull(version);
Control[] cs2 = (Control[]) objCs;
for (int i = 0; i < cs.length; i++) {
assertEquals(cs2[i], cs[i]);