MockTmScheduler.setFlag(VmOperation.CREATE_FOLDER, true);
MockTmScheduler.setFlag(VmOperation.CREATE_VM, false);
MockVcCache.setGetFlag(false);
// mock clone service
IClusterCloneService cloneService = Mockito.mock(IClusterCloneService.class);
Mockito.when(
cloneService.createCopies(Mockito.<VmCreateSpec> any(),
Mockito.anyInt(), Mockito.anyList(),
Mockito.<ProgressCallback> any())).thenReturn(
new ArrayList<VmCreateResult<?>>());
service.setCloneService(cloneService);