}
@Test
public void testCreateSameMediumTwiceWhenUsingOverwrite() throws Exception {
String path = System.getProperty("user.home") + "/jclouds-virtualbox-test/test-medium-3.vdi";
HardDisk hardDisk = HardDisk.builder().diskpath(path).controllerPort(0).deviceSlot(0).build();
new CreateMediumIfNotAlreadyExists(manager, machineUtils, true).apply(hardDisk);
IMedium iMedium = new CreateMediumIfNotAlreadyExists(manager, machineUtils, true).apply(hardDisk);
manager.get().getVBox().openMedium(path, DeviceType.HardDisk, AccessMode.ReadWrite, true);
try {
assertFileCanBeDeleted(path);