public function testStopConnection()
    {
        $this->connection->expects($this->once())
            ->method('isProxyStarted')
            ->will($this->returnValue(true));
        $this->connection->expects($this->once())
            ->method('isCustomSidProvided')
            ->will($this->returnValue(false));
        $this->connection->expects($this->once())
            ->method('isReady')
            ->will($this->returnValue(true));
        $this->api->start('firefox');

        $this->connection->expects($this->once())
            ->method('stop');

        $this->api->stop();
    }