DeleteVmSP implements Callable<Void> { @Override public Void call() throws Exception { if (vcVm != null) { vcVm.destroy(); } return null; } DeleteVmSP(VcVirtualMachine vm); @Override Void call();  }
@Test public void testDeleteVm() throws Exception { String vmName = "clonedVM1"; VcVirtualMachine vm = util.testImportVM(vmName, rp).getResult(); DeleteVmSP sp = new DeleteVmSP(vm); sp.call(); }