public Injector createInjectorWithLocation(final Location location) {
return Guice.createInjector(new SaxParserModule(), new AbstractModule() {
@Override
protected void configure() {
Names.bindProperties(binder(), new VCloudApiMetadata().getDefaultProperties());
bind(new TypeLiteral<Function<ReferenceType, Location>>() {
}).to(new TypeLiteral<FindLocationForResource>() {
});
bind(new TypeLiteral<Function<VApp, Hardware>>() {
}).to(new TypeLiteral<HardwareForVApp>() {