diff --git a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/Metadata.java b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/Metadata.java index aa79076f51..72661b9120 100644 --- a/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/Metadata.java +++ b/apis/rackspace-cloudloadbalancers/src/main/java/org/jclouds/rackspace/cloudloadbalancers/v1/domain/Metadata.java @@ -19,7 +19,7 @@ package org.jclouds.rackspace.cloudloadbalancers.v1.domain; import java.util.Map; import com.google.common.collect.ForwardingMap; -import static com.google.common.collect.Maps.newHashMap; +import static com.google.common.collect.Maps.newLinkedHashMap; import static com.google.common.collect.Sets.newHashSet; /** @@ -30,8 +30,8 @@ import static com.google.common.collect.Sets.newHashSet; * @author Everett Toews */ public class Metadata extends ForwardingMap { - private final Map metadata = newHashMap(); - private final Map keyToId = newHashMap(); + private final Map metadata = newLinkedHashMap(); // Implementing class must be sorted. + private final Map keyToId = newLinkedHashMap(); public Metadata(Metadata metadata) { super(); diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiExpectTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiExpectTest.java index 0fbb7d7074..51ba5b33fb 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiExpectTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/LoadBalancerApiExpectTest.java @@ -219,9 +219,9 @@ public class LoadBalancerApiExpectTest extends BaseCloudLoadBalancerApiExpectTes private Metadata getExpectedMetadata() { Metadata metadata = new Metadata(); + metadata.put("os", "ubuntu"); metadata.put("color", "red"); metadata.put("label", "web-load-balancer"); - metadata.put("os", "ubuntu"); return metadata; } diff --git a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApiExpectTest.java b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApiExpectTest.java index 2c41fbf637..0b3dcef3c2 100644 --- a/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApiExpectTest.java +++ b/apis/rackspace-cloudloadbalancers/src/test/java/org/jclouds/rackspace/cloudloadbalancers/v1/features/NodeApiExpectTest.java @@ -214,9 +214,9 @@ public class NodeApiExpectTest extends BaseCloudLoadBalancerApiExpectTest