You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@jclouds.apache.org by na...@apache.org on 2015/03/12 11:39:26 UTC

[08/10] jclouds-labs git commit: [JCLOUDS-664] Fixing live test execution

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiLiveTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiLiveTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiLiveTest.java
index e825c70..c0cb9b0 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiLiveTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiLiveTest.java
@@ -17,16 +17,14 @@
 package org.jclouds.azurecompute.internal;
 
 import static com.google.common.collect.Iterables.find;
-import static com.google.common.collect.Iterables.get;
 import static com.google.common.collect.Iterables.tryFind;
 import static java.util.concurrent.TimeUnit.SECONDS;
-import static org.jclouds.azurecompute.domain.NetworkConfiguration.AddressSpace;
-import static org.jclouds.azurecompute.domain.NetworkConfiguration.Subnet;
 import static org.jclouds.azurecompute.domain.NetworkConfiguration.VirtualNetworkSite;
 import static org.jclouds.util.Predicates2.retry;
 import static org.testng.Assert.assertTrue;
+
+import com.google.common.base.Optional;
 import java.util.List;
-import java.util.UUID;
 import java.util.logging.Logger;
 
 import org.jclouds.apis.BaseApiLiveTest;
@@ -36,152 +34,179 @@ import org.jclouds.azurecompute.domain.Deployment;
 import org.jclouds.azurecompute.domain.DeploymentParams;
 import org.jclouds.azurecompute.domain.NetworkConfiguration;
 import org.jclouds.azurecompute.domain.NetworkConfiguration.VirtualNetworkConfiguration;
-import org.jclouds.azurecompute.domain.Operation;
 import org.jclouds.azurecompute.domain.StorageService;
 import org.jclouds.azurecompute.domain.StorageServiceParams;
 import org.testng.annotations.AfterClass;
 import org.testng.annotations.BeforeClass;
 
-import com.google.common.base.Optional;
 import com.google.common.base.Predicate;
-import com.google.common.base.Predicates;
 import com.google.common.collect.ImmutableList;
-import com.google.common.collect.Iterables;
 
-import com.google.common.collect.Lists;
+import java.util.Random;
+import java.util.UUID;
+import java.util.logging.Level;
+import org.jclouds.azurecompute.AzureTestUtils;
+import org.jclouds.azurecompute.AzureTestUtils.SameVirtualNetworkSiteNamePredicate;
+import org.jclouds.azurecompute.compute.config.AzureComputeServiceContextModule;
+import org.jclouds.azurecompute.domain.NetworkConfiguration.AddressSpace;
+import org.jclouds.azurecompute.domain.NetworkConfiguration.Subnet;
+import org.jclouds.azurecompute.util.ConflictManagementPredicate;
 
 public class BaseAzureComputeApiLiveTest extends BaseApiLiveTest<AzureComputeApi> {
 
-   private static final String STORAGE_SERVICE = (System.getProperty("user.name") + "4jcloudsstorageaccount").toLowerCase().substring(0, 24);
-   private static final String VIRTUAL_NETWORK = (System.getProperty("user.name") + "-jclouds-virtual-network").toLowerCase();
+   protected static final int RAND = new Random().nextInt(999);
+
+   public static final String DEFAULT_ADDRESS_SPACE = "10.0.0.0/20";
+
+   public static final String DEFAULT_SUBNET_ADDRESS_SPACE = "10.0.0.0/23";
+
+   public static final String VIRTUAL_NETWORK_NAME = "jclouds-vnetsite";
 
-   private static final String DEFAULT_ADDRESS_SPACE_ADDRESS_PREFIX = "10.0.0.0/20";
-   private static final String DEFAULT_SUBNET_NAME = "jclouds-1";
-   private static final String DEFAULT_SUBNET_ADDRESS_PREFIX = "10.0.0.0/23";
+   public static final String DEFAULT_SUBNET_NAME = "jclouds-subnet";
+
+   public static final String LOCATION = "West Europe";
+
+   public static final String IMAGE_NAME
+           = "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu-14_04_1-LTS-amd64-server-20150123-en-us-30GB";
 
-   protected String location;
    protected StorageService storageService;
 
    protected Predicate<String> operationSucceeded;
+
    protected VirtualNetworkSite virtualNetworkSite;
 
+   private String storageServiceName = null;
+
    public BaseAzureComputeApiLiveTest() {
       provider = "azurecompute";
    }
 
+   protected String getStorageServiceName() {
+      if (storageServiceName == null) {
+         storageServiceName = String.format("%3.24s",
+                 System.getProperty("user.name") + RAND + this.getClass().getSimpleName()).toLowerCase();
+      }
+      return storageServiceName;
+   }
+
    @BeforeClass
    @Override
    public void setup() {
       super.setup();
-      operationSucceeded = retry(new Predicate<String>() {
-         public boolean apply(String input) {
-            return api.getOperationApi().get(input).status() == Operation.Status.SUCCEEDED;
-         }
-      }, 600, 5, 5, SECONDS);
-      // TODO: filter locations on those who have compute
-      location = get(api.getLocationApi().list(), 0).name();
-
-      StorageServiceParams params = StorageServiceParams.builder()
-              .name(STORAGE_SERVICE)
-              .label(STORAGE_SERVICE)
-              .location(location)
-              .accountType(StorageServiceParams.Type.Standard_GRS)
-              .build();
-      virtualNetworkSite = getOrCreateVirtualNetworkSite(VIRTUAL_NETWORK, location);
-      storageService = getOrCreateStorageService(STORAGE_SERVICE, params);
+
+      operationSucceeded = retry(
+              new AzureComputeServiceContextModule.OperationSucceededPredicate(api), 600, 5, 5, SECONDS);
+
+      virtualNetworkSite = getOrCreateVirtualNetworkSite(VIRTUAL_NETWORK_NAME, LOCATION);
+
+      final StorageServiceParams params = StorageServiceParams.builder().
+              name(getStorageServiceName()).
+              label(getStorageServiceName()).
+              location(LOCATION).
+              accountType(StorageServiceParams.Type.Standard_LRS).
+              build();
+      storageService = getOrCreateStorageService(getStorageServiceName(), params);
    }
 
    @AfterClass(alwaysRun = true)
    @Override
    protected void tearDown() {
-      super.tearDown();
-      // TODO fix remove storage account: it can't be removed as it contains disks!
-      /*
-      if (api.getStorageAccountApi().get(subscriptionId, STORAGE_SERVICE) != null) {
-         String requestId = api.getStorageAccountApi().delete(STORAGE_SERVICE);
-         assertTrue(operationSucceeded.apply(requestId), requestId);
-         Logger.getAnonymousLogger().info("storageService deleted: " + STORAGE_SERVICE);
-      }
-      */
-      List<VirtualNetworkSite> virtualNetworkSites = Lists.newArrayList(Iterables.filter(api.getVirtualNetworkApi().list(),
-              Predicates.not(new SameVirtualNetworkSiteNamePredicate(VIRTUAL_NETWORK))));
+      retry(new ConflictManagementPredicate(operationSucceeded) {
 
-      String requestId = api.getVirtualNetworkApi().set(NetworkConfiguration.create(VirtualNetworkConfiguration.create
-              (null, virtualNetworkSites)));
-      assertTrue(operationSucceeded.apply(requestId), requestId);
+         @Override
+         protected String operation() {
+            return api.getStorageAccountApi().delete(getStorageServiceName());
+         }
+      }, 600, 5, 5, SECONDS).apply(getStorageServiceName());
    }
 
-   protected CloudService getOrCreateCloudService(String cloudServiceName, String location) {
+   protected CloudService getOrCreateCloudService(final String cloudServiceName, final String location) {
       CloudService cloudService = api.getCloudServiceApi().get(cloudServiceName);
-      if (cloudService != null) return cloudService;
+      if (cloudService != null) {
+         return cloudService;
+      }
+
+      String requestId = api.getCloudServiceApi().createWithLabelInLocation(
+              cloudServiceName, cloudServiceName, location);
 
-      String requestId = api.getCloudServiceApi().createWithLabelInLocation(cloudServiceName, cloudServiceName, location);
       assertTrue(operationSucceeded.apply(requestId), requestId);
-      Logger.getAnonymousLogger().info("operation succeeded: " + requestId);
+      Logger.getAnonymousLogger().log(Level.INFO, "operation succeeded: {0}", requestId);
       cloudService = api.getCloudServiceApi().get(cloudServiceName);
-      Logger.getAnonymousLogger().info("created cloudService: " + cloudService);
+      Logger.getAnonymousLogger().log(Level.INFO, "created cloudService: {0}", cloudService);
       return cloudService;
    }
 
    protected Deployment getOrCreateDeployment(String serviceName, DeploymentParams params) {
       Deployment deployment = api.getDeploymentApiForService(serviceName).get(params.name());
-      if (deployment != null) return deployment;
+      if (deployment != null) {
+         return deployment;
+      }
 
       String requestId = api.getDeploymentApiForService(serviceName).create(params);
       assertTrue(operationSucceeded.apply(requestId), requestId);
-      Logger.getAnonymousLogger().info("operation succeeded: " + requestId);
+      Logger.getAnonymousLogger().log(Level.INFO, "operation succeeded: {0}", requestId);
       deployment = api.getDeploymentApiForService(serviceName).get(params.name());
 
-      Logger.getAnonymousLogger().info("created deployment: " + deployment);
+      Logger.getAnonymousLogger().log(Level.INFO, "created deployment: {0}", deployment);
       return deployment;
    }
 
    protected StorageService getOrCreateStorageService(String storageServiceName, StorageServiceParams params) {
-      StorageService storageService = api.getStorageAccountApi().get(storageServiceName);
-      if (storageService != null) return storageService;
+      StorageService ss = api.getStorageAccountApi().get(storageServiceName);
+      if (ss != null) {
+         return ss;
+      }
       String requestId = api.getStorageAccountApi().create(params);
       assertTrue(operationSucceeded.apply(requestId), requestId);
-      Logger.getAnonymousLogger().info("operation succeeded: " + requestId);
-      storageService = api.getStorageAccountApi().get(storageServiceName);
+      Logger.getAnonymousLogger().log(Level.INFO, "operation succeeded: {0}", requestId);
+      ss = api.getStorageAccountApi().get(storageServiceName);
 
-      Logger.getAnonymousLogger().info("created storageService: " + storageService);
-      return storageService;
+      Logger.getAnonymousLogger().log(Level.INFO, "created storageService: {0}", ss);
+      return ss;
    }
 
    protected VirtualNetworkSite getOrCreateVirtualNetworkSite(final String virtualNetworkSiteName, String location) {
-      Optional<VirtualNetworkSite> optionalVirtualNetworkSite = tryFind(api.getVirtualNetworkApi().list(),
-              new SameVirtualNetworkSiteNamePredicate(virtualNetworkSiteName));
-      if (optionalVirtualNetworkSite.isPresent()) return optionalVirtualNetworkSite.get();
-
-      final NetworkConfiguration networkConfiguration = NetworkConfiguration.create(
-              VirtualNetworkConfiguration.create(null,
-                      ImmutableList.of(VirtualNetworkSite.create(
-                              UUID.randomUUID().toString(),
-                              virtualNetworkSiteName,
-                              location,
-                              AddressSpace.create(DEFAULT_ADDRESS_SPACE_ADDRESS_PREFIX),
-                              ImmutableList.of(Subnet.create(DEFAULT_SUBNET_NAME, DEFAULT_SUBNET_ADDRESS_PREFIX, null))))
-              )
-      );
-      String requestId = api.getVirtualNetworkApi().set(networkConfiguration);
-      assertTrue(operationSucceeded.apply(requestId), requestId);
-      Logger.getAnonymousLogger().info("operation succeeded: " + requestId);
-      VirtualNetworkSite virtualNetworkSite = find(api.getVirtualNetworkApi().list(), new SameVirtualNetworkSiteNamePredicate(virtualNetworkSiteName));
+      final List<VirtualNetworkSite> current = AzureTestUtils.getVirtualNetworkSite(api);
 
-      Logger.getAnonymousLogger().info("created virtualNetworkSite: " + virtualNetworkSite);
-      return virtualNetworkSite;
-   }
-
-   private static class SameVirtualNetworkSiteNamePredicate implements Predicate<VirtualNetworkSite> {
-      private final String virtualNetworkSiteName;
+      final Optional<VirtualNetworkSite> optionalVirtualNetworkSite = tryFind(
+              current,
+              new SameVirtualNetworkSiteNamePredicate(virtualNetworkSiteName));
 
-      public SameVirtualNetworkSiteNamePredicate(String virtualNetworkSiteName) {
-         this.virtualNetworkSiteName = virtualNetworkSiteName;
+      if (optionalVirtualNetworkSite.isPresent()) {
+         return optionalVirtualNetworkSite.get();
       }
 
-      @Override
-      public boolean apply(VirtualNetworkSite input) {
-         return input.name().equals(virtualNetworkSiteName);
+      current.add(VirtualNetworkSite.create(UUID.randomUUID().toString(),
+              virtualNetworkSiteName,
+              location,
+              AddressSpace.create(DEFAULT_ADDRESS_SPACE),
+              ImmutableList.of(Subnet.create(DEFAULT_SUBNET_NAME, DEFAULT_SUBNET_ADDRESS_SPACE, null))));
+
+      final NetworkConfiguration networkConfiguration
+              = NetworkConfiguration.create(VirtualNetworkConfiguration.create(null, current));
+
+      VirtualNetworkSite vns;
+      try {
+         vns = find(
+                 api.getVirtualNetworkApi().getNetworkConfiguration().virtualNetworkConfiguration().
+                 virtualNetworkSites(),
+                 new SameVirtualNetworkSiteNamePredicate(virtualNetworkSiteName));
+      } catch (Exception e) {
+         retry(new ConflictManagementPredicate(operationSucceeded) {
+
+            @Override
+            protected String operation() {
+               return api.getVirtualNetworkApi().set(networkConfiguration);
+            }
+         }, 600, 30, 30, SECONDS).apply(virtualNetworkSiteName);
+
+         vns = find(
+                 api.getVirtualNetworkApi().getNetworkConfiguration().virtualNetworkConfiguration().
+                 virtualNetworkSites(),
+                 new SameVirtualNetworkSiteNamePredicate(virtualNetworkSiteName));
+
+         Logger.getAnonymousLogger().log(Level.INFO, "created virtualNetworkSite: {0}", vns);
       }
+      return vns;
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiMockTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiMockTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiMockTest.java
index a8999e7..5a47ca9 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiMockTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/internal/BaseAzureComputeApiMockTest.java
@@ -38,11 +38,13 @@ import com.squareup.okhttp.mockwebserver.MockWebServer;
 import com.squareup.okhttp.mockwebserver.RecordedRequest;
 
 public class BaseAzureComputeApiMockTest {
-   private final Set<Module> modules = ImmutableSet
-         .<Module>of(new ExecutorServiceModule(sameThreadExecutor()));
+
+   private final Set<Module> modules = ImmutableSet.<Module>of(new ExecutorServiceModule(sameThreadExecutor()));
 
    protected String provider;
+
    private final String identity;
+
    private final String credential;
 
    public BaseAzureComputeApiMockTest() {
@@ -57,7 +59,7 @@ public class BaseAzureComputeApiMockTest {
       Properties properties = new Properties();
       //properties.setProperty(SUBSCRIPTION_ID, "1234-1234-1234");
       return ContextBuilder.newBuilder(provider).credentials(identity, credential).endpoint(url.toString())
-            .modules(modules).overrides(properties).buildApi(AzureComputeApi.class);
+              .modules(modules).overrides(properties).buildApi(AzureComputeApi.class);
    }
 
    protected static MockWebServer mockAzureManagementServer() throws IOException {
@@ -92,7 +94,7 @@ public class BaseAzureComputeApiMockTest {
    }
 
    protected RecordedRequest assertSent(MockWebServer server, String method, String path, String resource)
-         throws InterruptedException {
+           throws InterruptedException {
       RecordedRequest request = assertSent(server, method, path);
       assertThat(new String(request.getBody(), UTF_8)).isEqualTo(stringFromResource(resource).trim());
       return request;

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/CloudServiceHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/CloudServiceHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/CloudServiceHandlerTest.java
index 5a71396..b11ae0e 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/CloudServiceHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/CloudServiceHandlerTest.java
@@ -30,6 +30,7 @@ import org.testng.annotations.Test;
 
 @Test(groups = "unit", testName = "HostedServiceHandlerTest")
 public class CloudServiceHandlerTest extends BaseHandlerTest {
+
    private static final DateService DATE_SERVICE = new SimpleDateFormatDateService();
 
    public void test() {
@@ -41,15 +42,15 @@ public class CloudServiceHandlerTest extends BaseHandlerTest {
 
    public static CloudService expected() {
       return CloudService.create( //
-            "neotys", // name
-            "West Europe", // location
-            null, // affinityGroup
-            "neotys", // label
-            "Implicitly created cloud service2012-08-06 14:55", // description
-            Status.CREATED, // status
-            DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T14:55:17Z"), // created
-            DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T15:50:34Z"), // lastModified
-            Collections.<String, String>emptyMap() // extendedProperties
+              "neotys", // name
+              "West Europe", // location
+              null, // affinityGroup
+              "neotys", // label
+              "Implicitly created cloud service2012-08-06 14:55", // description
+              Status.CREATED, // status
+              DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T14:55:17Z"), // created
+              DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T15:50:34Z"), // lastModified
+              Collections.<String, String>emptyMap() // extendedProperties
       );
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/DeploymentHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/DeploymentHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/DeploymentHandlerTest.java
index fa7ea38..4cea9ad 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/DeploymentHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/DeploymentHandlerTest.java
@@ -41,7 +41,8 @@ import com.google.common.collect.ImmutableList;
 public class DeploymentHandlerTest extends BaseHandlerTest {
 
    /**
-    * Covers values listed <a href="http://msdn.microsoft.com/en-us/library/azure/ee460804.aspx#RoleInstanceList">here</a>.
+    * Covers values listed
+    * <a href="http://msdn.microsoft.com/en-us/library/azure/ee460804.aspx#RoleInstanceList">here</a>.
     */
    public void parseInstanceStatus_Recognized() {
       assertEquals(parseInstanceStatus("Unknown"), InstanceStatus.UNKNOWN);
@@ -93,53 +94,53 @@ public class DeploymentHandlerTest extends BaseHandlerTest {
               null, // instanceErrorCode
               ImmutableList.of(Deployment.VirtualIP.create("191.233.85.49", true, "node1855162607153993262-b26ContractContract")), //virtualIPs
               ImmutableList.of(Deployment.RoleInstance.create(
-                      "node1855162607153993262-b26", // roleName
-                      "node1855162607153993262-b26", // instanceName
-                      InstanceStatus.READY_ROLE, //instanceStatus
-                      0,
-                      0,
-                      RoleSize.Type.BASIC_A0,
-                      "10.0.2.6",
-                      "node1855162607153993262-b26", // hostname
-                      ImmutableList.of(
-                              Deployment.InstanceEndpoint.create(
-                              "tcp_22-22", // name
-                              "191.233.85.49", // vip
-                              22, // publicPort
-                              22, // localPort
-                              "tcp" // protocol
+                              "node1855162607153993262-b26", // roleName
+                              "node1855162607153993262-b26", // instanceName
+                              InstanceStatus.READY_ROLE, //instanceStatus
+                              0,
+                              0,
+                              RoleSize.Type.BASIC_A0,
+                              "10.0.2.6",
+                              "node1855162607153993262-b26", // hostname
+                              ImmutableList.of(
+                                      Deployment.InstanceEndpoint.create(
+                                              "tcp_22-22", // name
+                                              "191.233.85.49", // vip
+                                              22, // publicPort
+                                              22, // localPort
+                                              "tcp" // protocol
+                                      )
                               )
-                      )
-              )),
+                      )),
               ImmutableList.of(Role.create(
-                      "node1855162607153993262-b26",
-                      "PersistentVMRole",
-                      null,
-                      null,
-                      ImmutableList.of(ConfigurationSet.create(
-                              "NetworkConfiguration",
-                              ImmutableList.of(
-                                      InputEndpoint.create("tcp_22-22", "tcp", 22, 22, "191.233.85.49", false, null, null, null),
-                                      InputEndpoint.create("tcp_2375-2375", "tcp", 2375, 2375, "191.233.85.49", false, null, null, null)
-                              ),
-                              ImmutableList.of(ConfigurationSet.SubnetName.create("Subnet-1")),
+                              "node1855162607153993262-b26",
+                              "PersistentVMRole",
+                              null,
                               null,
-                              ImmutableList.<ConfigurationSet.PublicIP>of(),
-                              null)),
-                      ImmutableList.<Role.ResourceExtensionReference>of(),
-                      null,
-                      ImmutableList.<DataVirtualHardDisk>of(),
-                      OSVirtualHardDisk.create(
-                              "ReadWrite",
-                              "node1855162607153993262-b26-node1855162607153993262-b26-0-201412221704390597",
+                              ImmutableList.of(ConfigurationSet.create(
+                                              "NetworkConfiguration",
+                                              ImmutableList.of(
+                                                      InputEndpoint.create("tcp_22-22", "tcp", 22, 22, "191.233.85.49", false, null, null, null),
+                                                      InputEndpoint.create("tcp_2375-2375", "tcp", 2375, 2375, "191.233.85.49", false, null, null, null)
+                                              ),
+                                              ImmutableList.of(ConfigurationSet.SubnetName.create("Subnet-1")),
+                                              null,
+                                              ImmutableList.<ConfigurationSet.PublicIP>of(),
+                                              null)),
+                              ImmutableList.<Role.ResourceExtensionReference>of(),
                               null,
+                              ImmutableList.<DataVirtualHardDisk>of(),
+                              OSVirtualHardDisk.create(
+                                      "ReadWrite",
+                                      "node1855162607153993262-b26-node1855162607153993262-b26-0-201412221704390597",
+                                      null,
+                                      null,
+                                      URI.create("https://test.blob.core.windows.net/clockerblob/container-node1855162607153993262-b26.vhd"),
+                                      "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu_DAILY_BUILD-trusty-14_04_1-LTS-amd64-server-20141212-en-us-30GB",
+                                      OSImage.Type.LINUX),
+                              RoleSize.Type.BASIC_A0,
                               null,
-                              URI.create("https://test.blob.core.windows.net/clockerblob/container-node1855162607153993262-b26.vhd"),
-                              "b39f27a8b8c64d52b05eac6a62ebad85__Ubuntu_DAILY_BUILD-trusty-14_04_1-LTS-amd64-server-20141212-en-us-30GB",
-                              OSImage.Type.LINUX),
-                      RoleSize.Type.BASIC_A0,
-                      null,
-                      null
+                              null
                       )),
               "jclouds" // virtualNetworkName
       );

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ErrorHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ErrorHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ErrorHandlerTest.java
index 3c9a74b..d627c23 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ErrorHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ErrorHandlerTest.java
@@ -37,6 +37,6 @@ public class ErrorHandlerTest extends BaseHandlerTest {
 
    public static Error expected() {
       return Error.create(Code.MISSING_OR_INVALID_REQUIRED_QUERY_PARAMETER,
-            "A required query parameter was not specified for this request or was specified incorrectly.");
+              "A required query parameter was not specified for this request or was specified incorrectly.");
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.java
index 1a99c06..7f98ca7 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListCloudServicesHandlerTest.java
@@ -33,6 +33,7 @@ import com.google.common.collect.ImmutableList;
 
 @Test(groups = "unit", testName = "ListHostedServicesHandlerTest")
 public class ListCloudServicesHandlerTest extends BaseHandlerTest {
+
    private static final DateService DATE_SERVICE = new SimpleDateFormatDateService();
 
    public void test() {
@@ -45,27 +46,27 @@ public class ListCloudServicesHandlerTest extends BaseHandlerTest {
 
    public static List<CloudService> expected() {
       return ImmutableList.of( //
-            CloudService.create( //
-                  "neotys", // name
-                  "West Europe", // location
-                  null, // affinityGroup
-                  "neotys", // label
-                  "Implicitly created cloud service2012-08-06 14:55", // description
-                  Status.CREATED, // status
-                  DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T14:55:17Z"), // created
-                  DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T15:50:34Z"), // lastModified
-                  Collections.<String, String>emptyMap() // extendedProperties
-            ), //
-            CloudService.create( //
-                  "neotys3", // name
-                  "West Europe", // location
-                  null, // affinityGroup
-                  "neotys3", // label
-                  null, // description
-                  Status.CREATED, // status
-                  DATE_SERVICE.iso8601SecondsDateParse("2012-08-07T09:00:02Z"), // created
-                  DATE_SERVICE.iso8601SecondsDateParse("2012-08-07T09:00:02Z"), // lastModified
-                  Collections.<String, String>emptyMap() // extendedProperties
-            ));
+              CloudService.create( //
+                      "neotys", // name
+                      "West Europe", // location
+                      null, // affinityGroup
+                      "neotys", // label
+                      "Implicitly created cloud service2012-08-06 14:55", // description
+                      Status.CREATED, // status
+                      DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T14:55:17Z"), // created
+                      DATE_SERVICE.iso8601SecondsDateParse("2012-08-06T15:50:34Z"), // lastModified
+                      Collections.<String, String>emptyMap() // extendedProperties
+              ), //
+              CloudService.create( //
+                      "neotys3", // name
+                      "West Europe", // location
+                      null, // affinityGroup
+                      "neotys3", // label
+                      null, // description
+                      Status.CREATED, // status
+                      DATE_SERVICE.iso8601SecondsDateParse("2012-08-07T09:00:02Z"), // created
+                      DATE_SERVICE.iso8601SecondsDateParse("2012-08-07T09:00:02Z"), // lastModified
+                      Collections.<String, String>emptyMap() // extendedProperties
+              ));
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.java
index 1b54185..df7968a 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDataVirtualHardDisksHandlerTest.java
@@ -33,28 +33,28 @@ public class ListDataVirtualHardDisksHandlerTest extends BaseHandlerTest {
    public void test() {
       InputStream is = getClass().getResourceAsStream("/datavirtualharddisk.xml");
       List<DataVirtualHardDisk> result = factory
-            .create(new ListDataVirtualHardDisksHandler(new DataVirtualHardDiskHandler())).parse(is);
+              .create(new ListDataVirtualHardDisksHandler(new DataVirtualHardDiskHandler())).parse(is);
       assertEquals(result, expected());
    }
 
    public static List<DataVirtualHardDisk> expected() {
       return ImmutableList.of(
-            DataVirtualHardDisk.create(
-                  DataVirtualHardDisk.Caching.READ_ONLY,
-                  "testimage1-testimage1-0-20120817095145",
-                  10,
-                  30,
-                  URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"),
-                  "Standard"
-            ),
-            DataVirtualHardDisk.create(
-                  DataVirtualHardDisk.Caching.READ_WRITE,
-                  "testimage2-testimage2-0-20120817095145",
-                  10,
-                  30,
-                  URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"),
-                  "Standard"
-            )
+              DataVirtualHardDisk.create(
+                      DataVirtualHardDisk.Caching.READ_ONLY,
+                      "testimage1-testimage1-0-20120817095145",
+                      10,
+                      30,
+                      URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"),
+                      "Standard"
+              ),
+              DataVirtualHardDisk.create(
+                      DataVirtualHardDisk.Caching.READ_WRITE,
+                      "testimage2-testimage2-0-20120817095145",
+                      10,
+                      30,
+                      URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"),
+                      "Standard"
+              )
       );
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.java
index 6dc2b91..8e80cea 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListDisksHandlerTest.java
@@ -42,26 +42,26 @@ public class ListDisksHandlerTest extends BaseHandlerTest {
 
    public static List<Disk> expected() {
       return ImmutableList.of( //
-            Disk.create( //
-                  "testimage2-testimage2-0-20120817095145", // name
-                  "West Europe", // location
-                  null, // affinityGroup
-                  null, //description
-                  OSImage.Type.LINUX, // os
-                  URI.create("http://blobs/vhds/testimage2-testimage2-2012-08-17.vhd"), // mediaLink
-                  30, // logicalSizeInGB
-                  null, // attachedTo
-                  "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd" // sourceImage
-            ), Disk.create( //
-                  "neotysss-neotysss-0-20120824091357", // name
-                  "West Europe", // location
-                  null, // affinityGroup
-                  null, //description
-                  OSImage.Type.WINDOWS, // os
-                  URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"), // mediaLink
-                  30, // logicalSizeInGB
-                  Attachment.create("neotysss", "neotysss", "neotysss"), // attachedTo
-                  "MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd" // sourceImage
-            ));
+              Disk.create( //
+                      "testimage2-testimage2-0-20120817095145", // name
+                      "West Europe", // location
+                      null, // affinityGroup
+                      null, //description
+                      OSImage.Type.LINUX, // os
+                      URI.create("http://blobs/vhds/testimage2-testimage2-2012-08-17.vhd"), // mediaLink
+                      30, // logicalSizeInGB
+                      null, // attachedTo
+                      "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd" // sourceImage
+              ), Disk.create( //
+                      "neotysss-neotysss-0-20120824091357", // name
+                      "West Europe", // location
+                      null, // affinityGroup
+                      null, //description
+                      OSImage.Type.WINDOWS, // os
+                      URI.create("http://blobs/disks/neotysss/MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd"), // mediaLink
+                      30, // logicalSizeInGB
+                      Attachment.create("neotysss", "neotysss", "neotysss"), // attachedTo
+                      "MSFT__Win2K8R2SP1-ABCD-en-us-30GB.vhd" // sourceImage
+              ));
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java
index 42f4010..bedb8e8 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListLocationsHandlerTest.java
@@ -40,12 +40,12 @@ public class ListLocationsHandlerTest extends BaseHandlerTest {
    public static List<Location> expected() {
       List<String> availableServices = ImmutableList.of("Compute", "Storage", "PersistentVMRole");
       return ImmutableList.of( //
-            Location.create("West US", "West US", availableServices), //
-            Location.create("East US", "East US", availableServices), //
-            Location.create("East Asia", "East Asia", availableServices), //
-            Location.create("Southeast Asia", "Southeast Asia", availableServices), //
-            Location.create("North Europe", "North Europe", availableServices), //
-            Location.create("West Europe", "West Europe", availableServices) //
+              Location.create("West US", "West US", availableServices), //
+              Location.create("East US", "East US", availableServices), //
+              Location.create("East Asia", "East Asia", availableServices), //
+              Location.create("Southeast Asia", "Southeast Asia", availableServices), //
+              Location.create("North Europe", "North Europe", availableServices), //
+              Location.create("West Europe", "West Europe", availableServices) //
       );
    }
 

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.java
index 922f3c5..29a9684 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/ListOSImagesHandlerTest.java
@@ -42,126 +42,126 @@ public class ListOSImagesHandlerTest extends BaseHandlerTest {
 
    public static List<OSImage> expected() {
       return ImmutableList.of( //
-            OSImage.create( //
-                  "CANONICAL__Canonical-Ubuntu-12-04-amd64-server-20120528.1.3-en-us-30GB.vhd", // name
-                  null, // locations
-                  null, // affinityGroup
-                  "Ubuntu Server 12.04 LTS", // label
-                  "Ubuntu Server 12.04 LTS amd64 20120528 Cloud Image", //description
-                  "Canonical", // category
-                  OSImage.Type.LINUX, // os
-                  "Canonical", //publisherName
-                  null, // mediaLink
-                  30, // logicalSizeInGB
-                  Arrays.asList("http://www.ubuntu.com/project/about-ubuntu/licensing") // eula
-            ),
-            OSImage.create( //
-                  "MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd", // name
-                  "North Europe", // locations
-                   null, // affinityGroup
-                  "Windows Server 2008 R2 SP1, June 2012", // label
-                  "Windows Server 2008 R2 is a multi-purpose server.", //description
-                  "Microsoft", // category
-                  OSImage.Type.WINDOWS, // os
-                  "Microsoft", //publisherName
-                  URI.create("http://blobs/disks/mydeployment/MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd"),
-                  // mediaLink
-                  30, // logicalSizeInGB
-                  Collections.<String>emptyList() // eula
-            ),
-            OSImage.create( //
-                  "MSFT__Sql-Server-11EVAL-11.0.2215.0-05152012-en-us-30GB.vhd", // name
-                  null, // locations
-                  null, // affinityGroup
-                  "Microsoft SQL Server 2012 Evaluation Edition", // label
-                  "SQL Server 2012 Evaluation Edition (64-bit).", //description
-                  "Microsoft", // category
-                  OSImage.Type.WINDOWS, // os
-                  "Microsoft", //publisherName
-                  null, // mediaLink
-                  30, // logicalSizeInGB
-                  Arrays.asList("http://go.microsoft.com/fwlink/?LinkID=251820",
-                        "http://go.microsoft.com/fwlink/?LinkID=131004") // eula
-            ),
-            OSImage.create( //
-                  "MSFT__Win2K12RC-Datacenter-201207.02-en.us-30GB.vhd", // name
-                  null, // locations
-                  null, // affinityGroup
-                  "Windows Server 2012 Release Candidate, July 2012", // label
-                  "Windows Server 2012 incorporates Microsoft's experience building.", //description
-                  "Microsoft", // category
-                  OSImage.Type.WINDOWS, // os
-                  "Microsoft", //publisherName
-                  null, // mediaLink
-                  30, // logicalSizeInGB
-                  Collections.<String>emptyList() // eula
-            ),
-            OSImage.create( //
-                  "MSFT__Win2K8R2SP1-Datacenter-201207.01-en.us-30GB.vhd", // name
-                  null, // locations
-                  null, // affinityGroup
-                  "Windows Server 2008 R2 SP1, July 2012", // label
-                  "Windows Server 2008 R2 is a multi-purpose server.", //description
-                  "Microsoft", // category
-                  OSImage.Type.WINDOWS, // os
-                  "Microsoft", //publisherName
-                  null, // mediaLink
-                  30, // logicalSizeInGB
-                  Collections.<String>emptyList() // eula
-            ),
-            OSImage.create( //
-                  "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd", // name
-                  null, // locations
-                  null, // affinityGroup
-                  "OpenLogic CentOS 6.2", // label
-                  "This distribution of Linux is based on CentOS.", //description
-                  "OpenLogic", // category
-                  OSImage.Type.LINUX, // os
-                  "openLogic", //publisherName
-                  URI.create("http://blobs/disks/mydeployment/OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd"),
-                  // mediaLink
-                  30, //logicalSizeInGB
-                  Arrays.asList("http://www.openlogic.com/azure/service-agreement/") // eula
-            ),
-            OSImage.create( //
-                  "SUSE__openSUSE-12-1-20120603-en-us-30GB.vhd", // name
-                  null, // locations
-                  null, // affinityGroup
-                  "openSUSE 12.1", // label
-                  "openSUSE is a free and Linux-based operating system!", //description
-                  "SUSE", // category
-                  OSImage.Type.LINUX, // os
-                  "SUSE", //publisherName
-                  null, // mediaLink
-                  30, // logicalSizeInGB
-                  Arrays.asList("http://opensuse.org/") // eula
-            ),
-            OSImage.create( //
-                  "SUSE__SUSE-Linux-Enterprise-Server-11SP2-20120601-en-us-30GB.vhd", // name
-                  null, // locations
-                  null, // affinityGroup
-                  "SUSE Linux Enterprise Server", // label
-                  "SUSE Linux Enterprise Server is a highly reliable value.", //description
-                  "SUSE", // category
-                  OSImage.Type.LINUX, // os
-                  "SUSE", //publisherName
-                  null, // mediaLink
-                  30, // logicalSizeInGB
-                  Arrays.asList("http://www.novell.com/licensing/eula/") // eula
-            ),
-            OSImage.create( //
-                  "0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.4-x64-v13.4", // name
-                  null, // locations
-                  null, // affinityGroup
-                  "RightImage-CentOS-6.4-x64-v13.4", // label
-                  null, //description
-                  "RightScale with Linux", // category
-                  OSImage.Type.LINUX, // os
-                  "RightScale with Linux",
-                  null, // mediaLink
-                  10, // logicalSizeInGB
-                  Collections.<String>emptyList() // No EULA, as RightScale stuffed ';' into the field.
-            )
+              OSImage.create( //
+                      "CANONICAL__Canonical-Ubuntu-12-04-amd64-server-20120528.1.3-en-us-30GB.vhd", // name
+                      null, // locations
+                      null, // affinityGroup
+                      "Ubuntu Server 12.04 LTS", // label
+                      "Ubuntu Server 12.04 LTS amd64 20120528 Cloud Image", //description
+                      "Canonical", // category
+                      OSImage.Type.LINUX, // os
+                      "Canonical", //publisherName
+                      null, // mediaLink
+                      30, // logicalSizeInGB
+                      Arrays.asList("http://www.ubuntu.com/project/about-ubuntu/licensing") // eula
+              ),
+              OSImage.create( //
+                      "MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd", // name
+                      "North Europe", // locations
+                      null, // affinityGroup
+                      "Windows Server 2008 R2 SP1, June 2012", // label
+                      "Windows Server 2008 R2 is a multi-purpose server.", //description
+                      "Microsoft", // category
+                      OSImage.Type.WINDOWS, // os
+                      "Microsoft", //publisherName
+                      URI.create("http://blobs/disks/mydeployment/MSFT__Win2K8R2SP1-120612-1520-121206-01-en-us-30GB.vhd"),
+                      // mediaLink
+                      30, // logicalSizeInGB
+                      Collections.<String>emptyList() // eula
+              ),
+              OSImage.create( //
+                      "MSFT__Sql-Server-11EVAL-11.0.2215.0-05152012-en-us-30GB.vhd", // name
+                      null, // locations
+                      null, // affinityGroup
+                      "Microsoft SQL Server 2012 Evaluation Edition", // label
+                      "SQL Server 2012 Evaluation Edition (64-bit).", //description
+                      "Microsoft", // category
+                      OSImage.Type.WINDOWS, // os
+                      "Microsoft", //publisherName
+                      null, // mediaLink
+                      30, // logicalSizeInGB
+                      Arrays.asList("http://go.microsoft.com/fwlink/?LinkID=251820",
+                              "http://go.microsoft.com/fwlink/?LinkID=131004") // eula
+              ),
+              OSImage.create( //
+                      "MSFT__Win2K12RC-Datacenter-201207.02-en.us-30GB.vhd", // name
+                      null, // locations
+                      null, // affinityGroup
+                      "Windows Server 2012 Release Candidate, July 2012", // label
+                      "Windows Server 2012 incorporates Microsoft's experience building.", //description
+                      "Microsoft", // category
+                      OSImage.Type.WINDOWS, // os
+                      "Microsoft", //publisherName
+                      null, // mediaLink
+                      30, // logicalSizeInGB
+                      Collections.<String>emptyList() // eula
+              ),
+              OSImage.create( //
+                      "MSFT__Win2K8R2SP1-Datacenter-201207.01-en.us-30GB.vhd", // name
+                      null, // locations
+                      null, // affinityGroup
+                      "Windows Server 2008 R2 SP1, July 2012", // label
+                      "Windows Server 2008 R2 is a multi-purpose server.", //description
+                      "Microsoft", // category
+                      OSImage.Type.WINDOWS, // os
+                      "Microsoft", //publisherName
+                      null, // mediaLink
+                      30, // logicalSizeInGB
+                      Collections.<String>emptyList() // eula
+              ),
+              OSImage.create( //
+                      "OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd", // name
+                      null, // locations
+                      null, // affinityGroup
+                      "OpenLogic CentOS 6.2", // label
+                      "This distribution of Linux is based on CentOS.", //description
+                      "OpenLogic", // category
+                      OSImage.Type.LINUX, // os
+                      "openLogic", //publisherName
+                      URI.create("http://blobs/disks/mydeployment/OpenLogic__OpenLogic-CentOS-62-20120531-en-us-30GB.vhd"),
+                      // mediaLink
+                      30, //logicalSizeInGB
+                      Arrays.asList("http://www.openlogic.com/azure/service-agreement/") // eula
+              ),
+              OSImage.create( //
+                      "SUSE__openSUSE-12-1-20120603-en-us-30GB.vhd", // name
+                      null, // locations
+                      null, // affinityGroup
+                      "openSUSE 12.1", // label
+                      "openSUSE is a free and Linux-based operating system!", //description
+                      "SUSE", // category
+                      OSImage.Type.LINUX, // os
+                      "SUSE", //publisherName
+                      null, // mediaLink
+                      30, // logicalSizeInGB
+                      Arrays.asList("http://opensuse.org/") // eula
+              ),
+              OSImage.create( //
+                      "SUSE__SUSE-Linux-Enterprise-Server-11SP2-20120601-en-us-30GB.vhd", // name
+                      null, // locations
+                      null, // affinityGroup
+                      "SUSE Linux Enterprise Server", // label
+                      "SUSE Linux Enterprise Server is a highly reliable value.", //description
+                      "SUSE", // category
+                      OSImage.Type.LINUX, // os
+                      "SUSE", //publisherName
+                      null, // mediaLink
+                      30, // logicalSizeInGB
+                      Arrays.asList("http://www.novell.com/licensing/eula/") // eula
+              ),
+              OSImage.create( //
+                      "0b11de9248dd4d87b18621318e037d37__RightImage-CentOS-6.4-x64-v13.4", // name
+                      null, // locations
+                      null, // affinityGroup
+                      "RightImage-CentOS-6.4-x64-v13.4", // label
+                      null, //description
+                      "RightScale with Linux", // category
+                      OSImage.Type.LINUX, // os
+                      "RightScale with Linux",
+                      null, // mediaLink
+                      10, // logicalSizeInGB
+                      Collections.<String>emptyList() // No EULA, as RightScale stuffed ';' into the field.
+              )
       );
    }
 }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.java
index 901264e..b6a7e65 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkConfigurationHandlerTest.java
@@ -39,11 +39,11 @@ public class NetworkConfigurationHandlerTest extends BaseHandlerTest {
       return NetworkConfiguration.create(
               NetworkConfiguration.VirtualNetworkConfiguration.create(null,
                       ImmutableList.of(NetworkConfiguration.VirtualNetworkSite.create(
-                              null,
-                              "jclouds-virtual-network",
-                              "West Europe",
-                              NetworkConfiguration.AddressSpace.create("10.0.0.0/20"),
-                              ImmutableList.of(NetworkConfiguration.Subnet.create("jclouds-1", "10.0.0.0/23", null))))
+                                      null,
+                                      "jclouds-virtual-network",
+                                      "West Europe",
+                                      NetworkConfiguration.AddressSpace.create("10.0.0.0/20"),
+                                      ImmutableList.of(NetworkConfiguration.Subnet.create("jclouds-1", "10.0.0.0/23", null))))
               )
       );
    }

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java
index f1bb03c..6f92ec6 100644
--- a/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java
+++ b/azurecompute/src/test/java/org/jclouds/azurecompute/xml/NetworkSecurityGroupHandlerTest.java
@@ -17,6 +17,7 @@
 package org.jclouds.azurecompute.xml;
 
 import static org.testng.Assert.assertEquals;
+
 import java.io.InputStream;
 
 import org.jclouds.azurecompute.domain.NetworkSecurityGroup;
@@ -38,10 +39,22 @@ public class NetworkSecurityGroupHandlerTest extends BaseHandlerTest {
 
    public static NetworkSecurityGroup expected() {
       return NetworkSecurityGroup.create( //
-            "jclouds-NSG", // name
-            "jclouds-NSG", // label
-            "West Europe", // location
+              "jclouds-NSG", // name
+              "jclouds-NSG", // label
+              "West Europe", // location
               ImmutableList.of(
+                      Rule.create("tcp_10-20", // name
+                              "Inbound", // type
+                              "100", // priority
+                              "Allow", // action
+                              "INTERNET", // sourceAddressPrefix
+                              "*", // sourcePortRange
+                              "*", // destinationAddressPrefix
+                              "10-20", // destinationPortRange
+                              "TCP", // protocol
+                              "Active", // state
+                              null // isDefault
+                      ),
                       Rule.create("ALLOW VNET INBOUND", // name
                               "Inbound", // type
                               "65000", // priority
@@ -50,7 +63,7 @@ public class NetworkSecurityGroupHandlerTest extends BaseHandlerTest {
                               "*", // sourcePortRange
                               "VIRTUAL_NETWORK", // destinationAddressPrefix
                               "*", // destinationPortRange
-                              "*",  // protocol
+                              "*", // protocol
                               "Active", // state
                               true // isDefault
                       ),
@@ -62,7 +75,7 @@ public class NetworkSecurityGroupHandlerTest extends BaseHandlerTest {
                               "*", // sourcePortRange
                               "VIRTUAL_NETWORK", // destinationAddressPrefix
                               "*", // destinationPortRange
-                              "*",  // protocol
+                              "*", // protocol
                               "Active", // state
                               true // isDefault
                       ),
@@ -74,7 +87,7 @@ public class NetworkSecurityGroupHandlerTest extends BaseHandlerTest {
                               "*", // sourcePortRange
                               "*", // destinationAddressPrefix
                               "*", // destinationPortRange
-                              "*",  // protocol
+                              "*", // protocol
                               "Active", // state
                               true // isDefault
                       ),
@@ -86,7 +99,7 @@ public class NetworkSecurityGroupHandlerTest extends BaseHandlerTest {
                               "*", // sourcePortRange
                               "INTERNET", // destinationAddressPrefix
                               "*", // destinationPortRange
-                              "*",  // protocol
+                              "*", // protocol
                               "Active", // state
                               true // isDefault
                       ),
@@ -98,7 +111,7 @@ public class NetworkSecurityGroupHandlerTest extends BaseHandlerTest {
                               "*", // sourcePortRange
                               "*", // destinationAddressPrefix
                               "*", // destinationPortRange
-                              "*",  // protocol
+                              "*", // protocol
                               "Active", // state
                               true // isDefault
                       ),
@@ -110,7 +123,7 @@ public class NetworkSecurityGroupHandlerTest extends BaseHandlerTest {
                               "*", // sourcePortRange
                               "*", // destinationAddressPrefix
                               "*", // destinationPortRange
-                              "*",  // protocol
+                              "*", // protocol
                               "Active", // state
                               true // isDefault
                       )

http://git-wip-us.apache.org/repos/asf/jclouds-labs/blob/c80d40a5/azurecompute/src/test/resources/networksecuritygroup.xml
----------------------------------------------------------------------
diff --git a/azurecompute/src/test/resources/networksecuritygroup.xml b/azurecompute/src/test/resources/networksecuritygroup.xml
index 34f5026..35d9b84 100644
--- a/azurecompute/src/test/resources/networksecuritygroup.xml
+++ b/azurecompute/src/test/resources/networksecuritygroup.xml
@@ -4,6 +4,18 @@
   <Location>West Europe</Location>
   <Rules>
     <Rule>
+      <Name>tcp_10-20</Name>
+      <Type>Inbound</Type>
+      <Priority>100</Priority>
+      <Action>Allow</Action>
+      <SourceAddressPrefix>INTERNET</SourceAddressPrefix>
+      <SourcePortRange>*</SourcePortRange>
+      <DestinationAddressPrefix>*</DestinationAddressPrefix>
+      <DestinationPortRange>10-20</DestinationPortRange>
+      <Protocol>TCP</Protocol>
+      <State>Active</State>
+    </Rule>
+    <Rule>
       <Name>ALLOW VNET INBOUND</Name>
       <Type>Inbound</Type>
       <Priority>65000</Priority>