/**
  * Converts the current object into ordered array representation.
  * 
  * @return array
  */
 protected function toArray()
 {
     $arr = parent::toArray();
     $order = array(Resources::XTAG_NAMESPACE, Resources::XTAG_NAME, Resources::XTAG_LABEL, Resources::XTAG_DESCRIPTION, Resources::XTAG_LOCATION);
     Utilities::addIfNotEmpty(Resources::XTAG_NAME, $this->getName(), $arr);
     $ordered = Utilities::orderArray($arr, $order);
     return $ordered;
 }
 /**
  * @covers WindowsAzure\ServiceManagement\Models\Service::serialize
  */
 public function testSerializeWithInvalidSerializer()
 {
     // Setup
     $this->setExpectedException('\\InvalidArgumentException', Resources::UNKNOWN_SRILZER_MSG);
     $service = new Service();
     // Test
     $service->serialize(new Service());
 }