public class VDCHandlerTest {
public void testApplyInputStream() {
InputStream is = getClass().getResourceAsStream("/vdc.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(), "Miami Environment 1");
assertEquals(result.getHref(), URI.create("https://services.vcloudexpress.terremark.com/api/v0.8/vdc/32"));
assertEquals(result.getResourceEntities(), ImmutableMap.<String, ReferenceType> of(
"adriantest",
new ReferenceTypeImpl("adriantest", TerremarkVCloudMediaType.VAPP_XML, URI