IConsole console = createNiceMock(IConsole.class);
IProgress progress = createNiceMock(IProgress.class);
expect(progress.getCompleted()).andReturn(true);
expect(machine.getCurrentSnapshot()).andReturn(null).anyTimes();
expect(manager.openMachineSession(machine)).andReturn(session);
expect(machine.getState()).andReturn(MachineState.PoweredOff).anyTimes();
expect(machine.getName()).andReturn("machine").anyTimes();
expect(session.getConsole()).andReturn(console);
expect(console.takeSnapshot(snapshotName, snapshotDesc)).andReturn(