public void test1net() {
InputStream is = getClass().getResourceAsStream("/vdc-1net.xml");
Injector injector = Guice.createInjector(new SaxParserModule());
Factory factory = injector.getInstance(ParseSax.Factory.class);
VDC result = factory.create(injector.getInstance(VDCHandler.class)).parse(is);
assertEquals(result.getName(), "demo6");
assertEquals(result.getDescription(),
"ServiceProfileName = Essential; ServiceLocation = US_WEST; Email = red@chair.com;");
assertEquals(result.getStatus(), Status.DEPLOYED);
assertEquals(result.getResourceEntities(), ImmutableSet.of(new ResourceImpl("1001", "Host1",
VCloudMediaType.VAPP_XML, URI
.create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1001")),
new ResourceImpl("1002", "Host2", VCloudMediaType.VAPP_XML, URI
.create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1002")),
new ResourceImpl("1003", "Host3", VCloudMediaType.VAPP_XML, URI
.create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1003")),
new ResourceImpl("1004", "Host4", VCloudMediaType.VAPP_XML, URI
.create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/vApp/1004"))));
assertEquals(result.getAvailableNetworks(), ImmutableSet.of(ResourceImpl.builder().id("VM-Tier01").name(
"VM Tier01").type(VCloudMediaType.NETWORK_XML).href(
URI.create("https://api.savvis.net/rest/api/v0.8/org/606677.0/vdc/1619/network/VM-Tier01"))
.build()));
}