expect(oldMachine.getName()).andReturn(oldMachineName);
expect(oldAttachment.getController()).andReturn(oldAttachmentController);
expect(oldAttachment.getDevice()).andReturn(oldAttachmentDevice);
expect(oldAttachment.getPort()).andReturn(oldAttachmentPort);
// TODO: is this ok that we searched by ID last time?
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();