expect(vBox.findMachine(oldMachineName)).andReturn(oldMachine);
expect(manager.getSessionObject()).andReturn(detachSession);
oldMachine.lockMachine(detachSession, LockType.Write);
expect(detachSession.getMachine()).andReturn(oldMachine);
oldMachine.detachDevice(oldAttachmentController, oldAttachmentPort, oldAttachmentDevice);
oldMachine.saveSettings();
expect(medium.deleteStorage()).andReturn(progress);
expect(vBox.createHardDisk(diskFormat, adminDiskPath)).andReturn(newHardDisk);
expect(newHardDisk.createBaseStorage(anyLong(), anyLong())).andReturn(progress);