> +      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);

Are we interested in how exactly this call is made? We know _some_ call is made 
because the result is correct...but would we care if e.g. _two_ calls were made?

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

Reply via email to