/**
  * Creates and returns the HTTP client.
  * 
  * @param array $config
  * @throws CommonException\MissingOptionException
  * @return \Zend\Http\Client
  */
 public function createHttpClient(array $config = array())
 {
     if (!isset($config[self::OPT_HTTP_CLIENT])) {
         throw new CommonException\MissingOptionException(self::OPT_HTTP_CLIENT);
     }
     $httpClientFactory = new Http\ClientFactory();
     return $httpClientFactory->createClient($config[self::OPT_HTTP_CLIENT]);
 }
 public function testCreateClient()
 {
     $factory = new ClientFactory();
     $httpClient = $factory->createClient();
     $this->assertInstanceOf('Zend\\Http\\Client', $httpClient);
 }