public function testCreate()
 {
     $testImage = self::getTestImage('HDD');
     $volume = new Swagger\Client\Model\Volume();
     $props = new \Swagger\Client\Model\VolumeProperties();
     $props->setName("test-volume")->setSize(3)->setType('HDD')->setImage($testImage->getId())->setImagePassword("testpassword123")->setSshKeys(array("hQGOEJeFL91EG3+l9TtRbWNjzhDVHeLuL3NWee6bekA="));
     $volume->setProperties($props);
     self::$testVolume = self::$volume_api->create(self::$testDatacenter->getId(), $volume);
     $testVolume = self::assertPredicate(function () {
         return self::$volume_api->findById(self::$testDatacenter->getId(), self::$testVolume->getId());
     });
     $this->assertEquals($testVolume->getProperties()->getName(), "test-volume");
 }
 public function testCreateVolume()
 {
     $volume = new Swagger\Client\Model\Volume();
     $props = new \Swagger\Client\Model\VolumeProperties();
     $props->setName("test-volume")->setSize(3)->setType('HDD')->setLicenceType('LINUX');
     $volume->setProperties($props);
     self::$testVolume = self::$volume_api->create(self::$testDatacenter->getId(), $volume);
     $testVolume = self::assertPredicate(function () {
         $volume = self::$volume_api->findById(self::$testDatacenter->getId(), self::$testVolume->getId());
         if ($volume->getMetadata()->getState() == 'AVAILABLE') {
             return $volume;
         }
     });
     $this->assertEquals($testVolume->getProperties()->getName(), "test-volume");
 }