public function let(LdapConnectionInterface $connection)
{
$this->config = (new DomainConfiguration('example.com'))->setSchemaName('example');
$this->config->setUseTls(true);
$ldapObject = new LdapObject(['defaultNamingContext' => 'dc=example,dc=com'], ['*'], '', 'ad');
$connection->getConfig()->willReturn($this->config);
$connection->getRootDse()->willReturn($ldapObject);
$config = new Configuration();
$parser = SchemaParserFactory::get($config->getSchemaFormat(), $config->getSchemaFolder());
$parserTest = SchemaParserFactory::get($config->getSchemaFormat(), __DIR__ . '/../../resources/schema');
$cache = CacheFactory::get('none', []);
$this->dispatcher = new SymfonyEventDispatcher();
$this->schemaFactoryTest = new LdapObjectSchemaFactory($cache, $parserTest, $this->dispatcher);
$this->schemaFactory = new LdapObjectSchemaFactory($cache, $parser, $this->dispatcher);
$this->attributes['unicodePwd'] = (new EncodeWindowsPassword())->toLdap('12345');
$this->addOperation = (new AddOperation('foo'))->setDn("cn=somedude,dc=foo,dc=bar")->setAttributes($this->attributes);
$this->beConstructedWith($connection, $this->schemaFactoryTest, $this->dispatcher);
}