def test_generate_one_task(test_init_connector):
    """Test the creation of one task

    Args:
      test_init_connector (object): an HTC grid connector

    Returns:
        dict: return a task to be reused by other test
    """
    tasks = [
        {
            "worker_arguments": "1000 1 1"
        }
    ]
    generated_task = test_init_connector.generate_user_task_json(tasks)
    generated_task.should.have.key("session_id")
    generated_task.should.have.key("scheduler_data")
    generated_task["scheduler_data"].should.have.key("task_timeout_sec")
    generated_task["scheduler_data"].should.have.key("retry_count")
    generated_task["scheduler_data"].should.have.key("tstamp_api_grid_connector_ms").which.should.be.equal(0)
    generated_task["scheduler_data"].should.have.key("tstamp_agent_read_from_sqs_ms").which.should.be.equal(0)
    generated_task.should.have.key("stats")
    generated_task.should.have.key("tasks_list")
    generated_task["tasks_list"].should.have.key("tasks").which.should.have.length_of(1)
    return generated_task