InputStream is = getClass().getResourceAsStream("/org.xml");
Org result = factory.create(injector.getInstance(OrgHandler.class)).parse(is);
assertEquals(result.getName(), "adrian@jclouds.org");
assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/org/48"));
assertEquals(result.getCatalogs(), ImmutableMap.of("Miami Environment 1 Catalog", new ReferenceTypeImpl(
"Miami Environment 1 Catalog", CATALOG_XML, URI
.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32/catalog"))));
assertEquals(result.getVDCs(), ImmutableMap.of("Miami Environment 1", new ReferenceTypeImpl(
"Miami Environment 1", TerremarkVCloudMediaType.VDC_XML, URI
.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32"))));
assertEquals(result.getTasksLists(), ImmutableMap.of(
"Miami Environment 1 Tasks List",
new ReferenceTypeImpl("Miami Environment 1 Tasks List", TASKSLIST_XML, URI
.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/vdc/32/tasksList"))));
assertEquals(result.getKeys(), new ReferenceTypeImpl("Keys", "application/vnd.tmrk.vcloudExpress.keysList+xml",
URI.create("https://services.vcloudexpress.terremark.com/api/v0.8a-ext1.6/extensions/org/48/keys")));
}