*/
protected Vm powerOffVm(String vmUrn) {
Vm test = vmApi.get(vmUrn);
Status status = test.getStatus();
if (status != Status.POWERED_OFF || test.isDeployed()) {
UndeployVAppParams undeployParams = UndeployVAppParams.builder().build();
Task shutdownVapp = vmApi.undeploy(vmUrn, undeployParams);
assertTaskSucceedsLong(shutdownVapp);
}
test = vmApi.get(vmUrn);
assertStatus(VM, test, Status.POWERED_OFF);