Location location = new LocationBuilder().id("https://1.1.1.1/api/v1.0/vdc/1").description("description")
.scope(LocationScope.PROVIDER).build();
Injector injector = createInjectorWithLocation(location);
InputStream is = getClass().getResourceAsStream("/vapp-pool.xml");
Factory factory = injector.getInstance(ParseSax.Factory.class);
VApp result = factory.create(injector.getInstance(VAppHandler.class)).parse(is);
VAppToNodeMetadata converter = injector.getInstance(VAppToNodeMetadata.class);
ImmutableMap<String, String> metadata = ImmutableMap.<String, String>of();
ImmutableSet<String> tags = ImmutableSet.<String>of();
String description = " user=user_ssoid_1\nuid=3b7bb605-bb30-4e62-a3de-9076b052dee7 label='foo-DEVELOPMENT' date=2013-01-22 17:39:28.252";
result = new VAppImpl(result.getName(), result.getType(), result.getHref(), result.getStatus(), result.getVDC(),
description, result.getTasks(), result.isOvfDescriptorUploaded(), result.getChildren(),
result.getNetworkSection());
NodeMetadata node = converter.apply(result);
assertNotNull(node);
assertEquals(node.getUserMetadata(), metadata);
assertEquals(node.getTags(), tags);