private static ResourceAllocationTaskState createAllocationRequestWithResourceDescription(
      String resourcePool,
      ComputeDescriptionService.ComputeDescription cd,
      ResourceDescriptionService.ResourceDescription rd) {
    ResourceAllocationTaskState state = new ResourceAllocationTaskState();
    state.taskSubStage =
        ResourceAllocationTaskService.SubStage.QUERYING_AVAILABLE_COMPUTE_RESOURCES;
    state.resourceCount = 2;
    state.resourcePoolLink = resourcePool;
    state.resourceDescriptionLink = rd.documentSelfLink;

    return state;
  }
  private static ResourceAllocationTaskState createAllocationRequest(
      String resourcePool,
      String computeDescriptionLink,
      List<String> diskDescriptionLinks,
      List<String> networkDescriptionLinks) {
    ResourceAllocationTaskState state = new ResourceAllocationTaskState();
    state.taskSubStage =
        ResourceAllocationTaskService.SubStage.QUERYING_AVAILABLE_COMPUTE_RESOURCES;
    state.resourceCount = 2;
    state.resourcePoolLink = resourcePool;
    state.computeDescriptionLink = computeDescriptionLink;
    state.computeType = ComputeType.VM_GUEST.toString();
    state.customProperties = new HashMap<>();
    state.customProperties.put("testProp", "testValue");

    // For most tests, we override resourceDescription.
    state.resourceDescriptionLink = null;

    state.diskDescriptionLinks = diskDescriptionLinks;
    state.networkDescriptionLinks = networkDescriptionLinks;

    return state;
  }