VirtualDatacenterDto vdcDto = new VirtualDatacenterDto();
vdcDto.setId(6);
vdcDto.setHypervisorType(HypervisorType.VMX_04);
VirtualDatacenter vdc = wrap(context, VirtualDatacenter.class, vdcDto);
Hardware hardware = function.apply(new VirtualMachineTemplateInVirtualDatacenter(template, vdc));
verify(vdcToLocation);
assertEquals(hardware.getProviderId(), template.getId().toString());
assertEquals(hardware.getId(), template.getId() + "/" + vdc.getId());