code: public void createTask(String jobId, TaskAddParameter taskToAdd, Iterable<BatchClientBehavior> additionalBehaviors)
              throws BatchErrorException, IOException {
          TaskAddOptions options = new TaskAddOptions();
          BehaviorManager bhMgr = new BehaviorManager(this.customBehaviors(), additionalBehaviors);
          bhMgr.applyRequestBehaviors(options);
  
          this.parentBatchClient.protocolLayer().tasks().add(jobId, taskToAdd, options);
      }
docs: Adds a single task to a job.
  
  @param jobId
  The ID of the job to which to add the task.
  @param taskToAdd
  The {@link TaskAddParameter task} to add.
  @param additionalBehaviors
  A collection of {@link BatchClientBehavior} instances that are
  applied to the Batch service request.
  @throws BatchErrorException
  Exception thrown when an error response is received from the
  Batch service.
  @throws IOException
  Exception thrown when there is an error in
  serialization/deserialization of data sent to/received from the
  Batch service.