public void testArbitratyImageName() {
   GoogleComputeEngineImageToImage imageToImage = new GoogleComputeEngineImageToImage();
   Image image = imageBuilder.name("arbitratyname").build();
   org.jclouds.compute.domain.Image transformed = imageToImage.apply(image);
   assertEquals(transformed.getName(), image.getName());
   assertEquals(transformed.getId(), image.getName());
   assertEquals(transformed.getProviderId(), image.getId());
   assertSame(transformed.getOperatingSystem().getFamily(), OsFamily.LINUX);
 }
 public void testWellFormedImageName() {
   GoogleComputeEngineImageToImage imageToImage = new GoogleComputeEngineImageToImage();
   Image image = imageBuilder.name("ubuntu-12-04-v123123").build();
   org.jclouds.compute.domain.Image transformed = imageToImage.apply(image);
   assertEquals(transformed.getName(), image.getName());
   assertEquals(transformed.getId(), image.getName());
   assertEquals(transformed.getProviderId(), image.getId());
   assertSame(transformed.getOperatingSystem().getFamily(), OsFamily.UBUNTU);
   assertEquals(transformed.getOperatingSystem().getVersion(), "12.04");
 }
@Test(groups = "unit")
public class GoogleComputeEngineImageToImageTest {

  Image.Builder imageBuilder =
      Image.builder()
          .id("1234")
          .selfLink(URI.create("http://test.com"))
          .sourceType("RAW")
          .description("")
          .rawDisk(Image.RawDisk.builder().source("").containerType("TAR").build());

  public void testArbitratyImageName() {
    GoogleComputeEngineImageToImage imageToImage = new GoogleComputeEngineImageToImage();
    Image image = imageBuilder.name("arbitratyname").build();
    org.jclouds.compute.domain.Image transformed = imageToImage.apply(image);
    assertEquals(transformed.getName(), image.getName());
    assertEquals(transformed.getId(), image.getName());
    assertEquals(transformed.getProviderId(), image.getId());
    assertSame(transformed.getOperatingSystem().getFamily(), OsFamily.LINUX);
  }

  public void testWellFormedImageName() {
    GoogleComputeEngineImageToImage imageToImage = new GoogleComputeEngineImageToImage();
    Image image = imageBuilder.name("ubuntu-12-04-v123123").build();
    org.jclouds.compute.domain.Image transformed = imageToImage.apply(image);
    assertEquals(transformed.getName(), image.getName());
    assertEquals(transformed.getId(), image.getName());
    assertEquals(transformed.getProviderId(), image.getId());
    assertSame(transformed.getOperatingSystem().getFamily(), OsFamily.UBUNTU);
    assertEquals(transformed.getOperatingSystem().getVersion(), "12.04");
  }
}