errorBuilder.append("'/Users/johndoe/jclouds-virtualbox-test/testadmin.vdi' (0x80BB0001)");
String errorMessage = errorBuilder.toString();
expect(manager.getVBox()).andReturn(vBox).anyTimes();
VBoxException notFoundException = new VBoxException(createNiceMock(Throwable.class), errorMessage);
expect(vBox.openMedium(adminDiskPath, DeviceType.HardDisk, AccessMode.ReadWrite, false)).andThrow(notFoundException);
expect(vBox.createHardDisk(diskFormat, adminDiskPath)).andReturn(medium);
expect(medium.createBaseStorage(anyLong(), anyLong())).andReturn(progress);
//expect(machineUtils.writeLockMachineAndApply(anyString(), new DetachDistroMediumFromMachine(anyString(), anyInt() , anyInt()))).andReturn().anyTimes();
replay(manager, machine, vBox, medium, machineUtils);