function let(LdapConnectionInterface $connection)
{
$attribbutes = ['defaultNamingContext' => 'dc=example,dc=local', 'configurationNamingContext' => 'cn=Configuration,dc=example,dc=local'];
$rootDse = new LdapObject($attribbutes);
$this->filter = new OperatorCollection();
$this->filter->add(new Comparison('foo', '=', 'bar'));
$this->operation = new QueryOperation($this->filter);
$this->operation->setFilter($this->filter);
$this->operation->setAttributes(["cn", "givenName", "foo"]);
$op = clone $this->operation;
$op->setFilter($this->filter->toLdapFilter());
$connection->execute($op)->willReturn($this->ldapEntries);
$connection->getRootDse()->willReturn($rootDse);
$connection->getConfig()->willReturn(new DomainConfiguration('example.local'));
$this->beConstructedWith($connection);
$this->setQueryOperation($this->operation);
}