@Test
public void testProcess() throws Exception {

    String templatePath = "/tmp";
    String templateName = "template";
    long virtualSize = 2000;
    long actualSize = 1000;
    Mockito.when(mockStorageLayer.exists(Mockito.anyString())).thenReturn(true);
    File mockFile = Mockito.mock(File.class);
    Mockito.when(mockStorageLayer.getFile(Mockito.anyString())).thenReturn(mockFile);
    Mockito.when(mockStorageLayer.getSize(Mockito.anyString())).thenReturn(actualSize);
    Mockito.doReturn(virtualSize).when(processor).getTemplateVirtualSize((File) Mockito.any());
    Processor.FormatInfo info = processor.process(templatePath, null, templateName);
    Assert.assertEquals(Storage.ImageFormat.VHD, info.format);
    Assert.assertEquals(actualSize, info.size);
    Assert.assertEquals(virtualSize, info.virtualSize);
    Assert.assertEquals(templateName + ".vhd", info.filename);
}