public function testSingleTracking()
 {
     $service = new GATracking('foo');
     $trackingRequest = new TrackingRequest();
     $trackingRequest->setPayload(array('foo' => 'bar'));
     $trackingRequest->setResponseHeader(array('baz' => 'fooBar'));
     $collection = new TrackingRequestCollection();
     $collection->add($trackingRequest);
     $clientMock = $this->getMock('Racecore\\GATracking\\Client\\Adapter\\Socket');
     $clientMock->expects($this->once())->method('send')->will($this->returnValue($collection));
     $tracking = $this->getMock('Racecore\\GATracking\\Tracking\\Event');
     $tracking->expects($this->once())->method('getPackage')->will($this->returnValue(array('test' => 'bar')));
     $service->setClientAdapter($clientMock);
     $response = $service->sendTracking($tracking);
     $responsePayload = $response->getPayload();
     $responseHeader = $response->getResponseHeader();
     $this->assertInstanceOf('Racecore\\GATracking\\Request\\TrackingRequest', $response);
     $this->assertArrayHasKey('foo', $responsePayload);
     $this->assertEquals('bar', $responsePayload['foo']);
     $this->assertArrayHasKey('baz', $responseHeader);
     $this->assertEquals('fooBar', $responseHeader['baz']);
 }