diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/OrgList.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/OrgList.java
index bf6cbd7882..5351747da1 100644
--- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/OrgList.java
+++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/OrgList.java
@@ -49,12 +49,12 @@ public class OrgList {
public static class Builder {
- private Set orgs = Sets.newLinkedHashSet();
+ private Set orgs = Sets.newLinkedHashSet();
/**
* @see OrgList#getOrgs
*/
- public Builder orgs(Set orgs) {
+ public Builder orgs(Set orgs) {
this.orgs = Sets.newLinkedHashSet(checkNotNull(orgs, "orgs"));
return this;
}
@@ -62,7 +62,7 @@ public class OrgList {
/**
* @see OrgList#getOrgs
*/
- public Builder addOrg(Link org) {
+ public Builder org(Reference org) {
orgs.add(checkNotNull(org, "org"));
return this;
}
@@ -80,14 +80,14 @@ public class OrgList {
// For JAXB and builder use
}
- private OrgList(Set orgs) {
+ private OrgList(Set orgs) {
this.orgs = ImmutableSet.copyOf(orgs);
}
@XmlElement(namespace = NS, name = "Org")
- private Set orgs = Sets.newLinkedHashSet();
+ private Set orgs = Sets.newLinkedHashSet();
- public Set getOrgs() {
+ public Set getOrgs() {
return ImmutableSet.copyOf(orgs);
}
diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorRestClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorRestClientExpectTest.java
index 99f5eea22b..1b5d01265e 100644
--- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorRestClientExpectTest.java
+++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/internal/BaseVCloudDirectorRestClientExpectTest.java
@@ -56,5 +56,19 @@ public class BaseVCloudDirectorRestClientExpectTest extends BaseRestClientExpect
identity = String.format("%s@%s", user, org);
credential = password;
}
+
+ protected HttpRequest getStandardRequest(String method, URI uri) {
+ return HttpRequest.builder().method(method).endpoint(uri).headers(
+ ImmutableMultimap. builder()
+ .put("Accept", "*/*")
+ .put("x-vcloud-authorization",token)
+ .build()).build();
+ }
+
+ protected HttpResponse getStandardPaylodResponse(String relativeFilePath) {
+ return HttpResponse.builder().statusCode(200)
+ .payload(payloadFromResourceWithContentType(relativeFilePath, VCloudDirectorMediaType.ORGLIST_XML
+ + ";version=1.5")).build();
+ }
}