function it_should_authenticate_a_user_but_not_reconnect_if_the_connection_wasnt_bound($connection)
{
$operation = (new AuthenticationOperation())->setUsername('foo')->setPassword('bar');
$connection->connect('foo', 'bar', false, null)->willReturn($connection);
$connection->isBound()->willReturn(false);
$connection->close()->willReturn($connection);
$this->execute($operation)->shouldReturnAnInstanceOf('\\LdapTools\\Operation\\AuthenticationResponse');
}