> +      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());
> +      Template template = templateBuilder.build();
> +
> +      assertEquals(template.getImage().getId(), image.getId());
> +      verify(getImageStrategy);

> and we need to make sure the strategy is not being called again.

OK, then let's leave as-is.

---
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/396/files#r13599893

Reply via email to