> + };
> +
> + final GetImageStrategy getImageStrategy =
> createMock(GetImageStrategy.class);
> +
> + expect(getImageStrategy.getImage(image.getId())).andReturn(image);
> + replay(getImageStrategy);
> +
> + Provider<TemplateBuilder> templateBuilderProvider = new
> Provider<TemplateBuilder>() {
> + @Override
> + public TemplateBuilder get() {
> + return createTemplateBuilder(null, locations, images, hardwares,
> region, optionsProvider, this, getImageStrategy);
> + }
> + };
> +
> + // Note that the image provided is not in the image list, but it is
> the one returned by the GetImagestrategy
> + TemplateBuilder templateBuilder =
> templateBuilderProvider.get().imageId(image.getId());
I'm probably missing something here...why do we need to construct the
complicated templateBuliderProvider above if we simply call `get()` on it here?
Can't we just use `createTemplateBuilder(...)`?
---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/396/files#r13522294