From 7e87185858e6c14fa77b59ddf1b65e4e770c930c Mon Sep 17 00:00:00 2001 From: Adrian Cole Date: Wed, 7 Mar 2012 09:51:46 -0800 Subject: [PATCH] fix broken test --- .../jclouds/vcloud/director/v1_5/domain/CatalogType.java | 2 ++ .../director/v1_5/features/CatalogClientExpectTest.java | 9 +++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogType.java b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogType.java index 04c153d13b..f56095d5f6 100644 --- a/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogType.java +++ b/labs/vcloud-director/src/main/java/org/jclouds/vcloud/director/v1_5/domain/CatalogType.java @@ -24,6 +24,7 @@ import java.net.URI; import java.util.Set; import javax.xml.bind.annotation.XmlElement; +import javax.xml.bind.annotation.XmlRootElement; import com.google.common.base.Objects; import com.google.common.base.Objects.ToStringHelper; @@ -37,6 +38,7 @@ import com.google.common.base.Objects.ToStringHelper; * * @author danikov */ +@XmlRootElement(name = "Catalog") public class CatalogType> extends EntityType { public static > Builder builder() { diff --git a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java index 8ec7da7646..30cfafc66b 100644 --- a/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java +++ b/labs/vcloud-director/src/test/java/org/jclouds/vcloud/director/v1_5/features/CatalogClientExpectTest.java @@ -26,9 +26,9 @@ import org.jclouds.http.HttpRequest; import org.jclouds.http.HttpResponse; import org.jclouds.vcloud.director.v1_5.VCloudDirectorClient; import org.jclouds.vcloud.director.v1_5.VCloudDirectorMediaType; -import org.jclouds.vcloud.director.v1_5.domain.Catalog; import org.jclouds.vcloud.director.v1_5.domain.CatalogItem; import org.jclouds.vcloud.director.v1_5.domain.CatalogItems; +import org.jclouds.vcloud.director.v1_5.domain.CatalogType; import org.jclouds.vcloud.director.v1_5.domain.Link; import org.jclouds.vcloud.director.v1_5.domain.Metadata; import org.jclouds.vcloud.director.v1_5.domain.MetadataEntry; @@ -67,7 +67,7 @@ public class CatalogClientExpectTest extends BaseVCloudDirectorRestClientExpectT VCloudDirectorClient client = requestsSendResponses(loginRequest, sessionResponse, catalogRequest, catalogResponse); - Catalog expected = catalog(); + CatalogType expected = catalog(); URI catalogURI = URI.create(endpoint + "/catalog/7212e451-76e1-4631-b2de-ba1dfd8080e4"); assertEquals(client.getCatalogClient().getCatalog(catalogURI), expected); @@ -376,8 +376,9 @@ public class CatalogClientExpectTest extends BaseVCloudDirectorRestClientExpectT assertEquals(client.getCatalogClient().getMetadataClient().deleteMetadataEntry(catalogItemURI, "KEY"), expected); } - public static final Catalog catalog() { - return Catalog.builder() + @SuppressWarnings("unchecked") + public static final CatalogType catalog() { + return CatalogType.builder() .name("QunyingTestCatalog") .type("application/vnd.vmware.vcloud.catalog+xml") .id("urn:vcloud:catalog:7212e451-76e1-4631-b2de-ba1dfd8080e4")