> +      TemplateBuilder defaultTemplate = createMock(TemplateBuilder.class);
> +      TemplateOptions defaultOptions = createMock(TemplateOptions.class);
> +      GetImageStrategy getImageStrategy = createMock(GetImageStrategy.class);
> +
> +      expect(optionsProvider.get()).andReturn(new TemplateOptions());
> +      
> expect(getImageStrategy.getImage(anyObject(String.class))).andReturn(null);
> +      replay(defaultTemplate, optionsProvider, templateBuilderProvider, 
> getImageStrategy);
> +      TemplateBuilderImpl templateBuilder = new 
> ArbitraryCpuRamTemplateBuilderImpl(locations, new ImageCacheSupplier(images, 
> 60,
> +            Atomics.<AuthorizationException>newReference(), 
> Providers.of(getImageStrategy)), hardwares,
> +            Suppliers.ofInstance(region), optionsProvider, 
> templateBuilderProvider);
> +      templateBuilder.minRam(1024);
> +      templateBuilder.minCores(2);
> +      Hardware hardware = templateBuilder.build().getHardware();
> +      assertThat(hardware.getRam()).isEqualTo(1024);
> +      
> assertThat(hardware.getProcessors()).extracting("cores").containsExactly(2.0);
> +   }

Also verify the hardware ID too, to make sure an automatic one has been picked.

---
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/jclouds/jclouds/pull/984/files/5e38477f80df5dd0dce54f7773cf9e883fbf3d2d#r71279930

Reply via email to