### Question:
OpenStackJclouds implements CloudMiddleware { @Override public void migrate(String vmId, String destinationNodeHostName) throws CloudMiddlewareException { assertHostName(destinationNodeHostName); assertVmId(vmId); if (openStackJcloudsApis.getServerApi().get(vmId) != null) { openStackJcloudsApis.getServerAdminApi().liveMigrate(vmId, destinationNodeHostName, false, false); } } OpenStackJclouds(OpenStackCredentials openStackCredentials, String[] securityGroups, String[] hostNames); @Override // This function is blocking. The thread execution blocks until the VM is deployed. // I would prefer to see this blocking in the VmManager class. I need to block the execution because // I need to return the ID of the deployed VM to the Application Manager. String deploy(Vm vm, String hostname); @Override String deployWithVolume(Vm vm, String hostname, String isoPath); @Override // This function is also blocking. The reason is the same as in the deploy function. void destroy(String vmId); @Override void migrate(String vmId, String destinationNodeHostName); @Override List<String> getAllVMsIds(); @Override List<String> getScheduledNonDeployedVmsIds(); @Override VmDeployed getVM(String vmId); @Override boolean existsVm(String vmId); @Override void rebootHardVm(String vmId); @Override void rebootSoftVm(String vmId); @Override void startVm(String vmId); @Override void stopVm(String vmId); @Override void suspendVm(String vmId); @Override void resumeVm(String vmId); @Override List<ImageUploaded> getVmImages(); @Override String createVmImage(ImageToUpload imageToUpload); @Override ImageUploaded getVmImage(String imageId); @Override void deleteVmImage(String id); @Override void assignFloatingIp(String vmId); String getZone(); NovaApi getNovaApi(); static final String[] DEFAULT_FLAVORS; }### Answer:
@Test public void migrateTest() { }