def METHOD_NAME():
    """
    Test to add a job to queue.
    """
    name = "jboss"
    timespec = "9:09 11/04/15"
    tag = "love"
    user = "jam"
    # mock for at.at module call
    mock_atat = {
        "jobs": [
            {
                "date": "2015-11-04",
                "job": "1476031633.a",
                "queue": "a",
                "tag": tag,
                "time": "09:09:00",
                "user": user,
            },
        ],
    }
    # normale return
    ret = {
        "name": name,
        "result": True,
        "changes": {
            "date": "2015-11-04",
            "job": "1476031633.a",
            "queue": "a",
            "tag": "love",
            "time": "09:09:00",
            "user": "jam",
        },
        "comment": "job {name} added and will run on {timespec}".format(
            name=name, timespec=timespec
        ),
    }
    # unknown user return
    ret_user = {}
    ret_user.update(ret)
    ret_user.update(
        {
            "result": False,
            "changes": {},
            "comment": "user {} does not exists".format(user),
        }
    )
    # add a job
    mock = MagicMock(return_value=mock_atat)
    with patch.dict(at.__opts__, {"test": False}):
        with patch.dict(at.__salt__, {"at.at": mock}):
            assert at.present(name, timespec, tag) == ret
    # add a job with a non-existing user
    mock = MagicMock(return_value=False)
    with patch.dict(at.__opts__, {"test": False}):
        with patch.dict(at.__salt__, {"user.info": mock}):
            assert at.present(name, timespec, tag, user) == ret_user
    # add a job with test=True
    with patch.dict(at.__opts__, {"test": True}):
        ret_test = {}
        ret_test.update(ret)
        ret_test.update({"result": None, "changes": {}})
        assert at.present(name, timespec, tag, user) == ret_test