Provider<TemplateOptions> optionsProvider = createMock(Provider.class);
Provider<TemplateBuilder> templateBuilderProvider = createMock(Provider.class);
TemplateOptions defaultOptions = createMock(TemplateOptions.class);
Image knownImage = createMock(Image.class);
OperatingSystem os = createMock(OperatingSystem.class);
expect(optionsProvider.get()).andReturn(defaultOptions);
expect(knownImage.getId()).andReturn("us-east-1/ami").atLeastOnce();
expect(knownImage.getLocation()).andReturn(region).atLeastOnce();
expect(knownImage.getName()).andReturn(null).atLeastOnce();
expect(knownImage.getDescription()).andReturn(null).atLeastOnce();
expect(knownImage.getVersion()).andReturn(null).atLeastOnce();
expect(knownImage.getProviderId()).andReturn("ami").atLeastOnce();
expect(knownImage.getOperatingSystem()).andReturn(os).atLeastOnce();
expect(os.getName()).andReturn(null).atLeastOnce();
expect(os.getVersion()).andReturn(null).atLeastOnce();
expect(os.getFamily()).andReturn(null).atLeastOnce();
expect(os.getDescription()).andReturn(null).atLeastOnce();
expect(os.getArch()).andReturn("paravirtual").atLeastOnce();
expect(os.is64Bit()).andReturn(false).atLeastOnce();
replay(knownImage);
replay(os);
replay(defaultOptions);
replay(optionsProvider);