/**
  * @covers WindowsAzure\ServiceManagement\Models\GetAffinityGroupPropertiesResult::create
  */
 public function testCreate()
 {
     // Setup
     $array = array('HostedServices' => array('Url' => 'url', 'ServiceName' => 'name'), 'StorageServices' => array('Url' => 'url', 'ServiceName' => 'name'));
     // Test
     $actual = GetAffinityGroupPropertiesResult::create($array);
     // Assert
     $this->assertCount(1, $actual->getHostedServices());
     $this->assertCount(1, $actual->getStorageServices());
 }
 /**
  * Returns the system properties associated with the specified affinity group.
  * 
  * @param string $name The affinity group name.
  * 
  * @return Models\GetAffinityGroupPropertiesResult
  * 
  * @see http://msdn.microsoft.com/en-us/library/windowsazure/ee460789.aspx
  */
 public function getAffinityGroupProperties($name)
 {
     Validate::isString($name, 'name');
     Validate::notNullOrEmpty($name, 'name');
     $context = new HttpCallContext();
     $context->setMethod(Resources::HTTP_GET);
     $context->setPath($this->_getAffinityGroupPath($name));
     $context->addStatusCode(Resources::STATUS_OK);
     $response = $this->sendContext($context);
     $parsed = $this->dataSerializer->unserialize($response->getBody());
     return GetAffinityGroupPropertiesResult::create($parsed);
 }