.<String, Location> of("az-1.region-a.geo-1", region));
@Test
public void testConversionWhereLocationFound() {
UUID id = UUID.randomUUID();
Image novaImageToConvert = Image.builder().id(id.toString()).name("Test Image " + id).status(Image.Status.DELETED).build();
OperatingSystem operatingSystem = new OperatingSystem(OsFamily.UBUNTU, "My Test OS", "My Test Version", "x86",
"My Test OS", true);
ImageInRegionToImage converter = new ImageInRegionToImage(NovaComputeServiceContextModule.toPortableImageStatus,
constant(operatingSystem), locationIndex);
ImageInRegion novaImageInRegionToConvert = new ImageInRegion(novaImageToConvert, "az-1.region-a.geo-1");
org.jclouds.compute.domain.Image convertedImage = converter.apply(novaImageInRegionToConvert);
assertEquals(convertedImage.getId(), novaImageInRegionToConvert.slashEncode());
assertEquals(convertedImage.getProviderId(), novaImageToConvert.getId());
assertEquals(convertedImage.getLocation(), locationIndex.get().get("az-1.region-a.geo-1"));
assertEquals(convertedImage.getName(), novaImageToConvert.getName());
assertEquals(convertedImage.getStatus(), org.jclouds.compute.domain.Image.Status.DELETED);
assertEquals(convertedImage.getOperatingSystem(), operatingSystem);
}