JWT test case mocking in nodejs

I am trying to write a test case for jwt token validation in node js.I am able to cover failure cases but not successful case.

isValid: function (request, reply) {
    if (request.query && request.query.token) {
        var token = request.query.token;
        validateTok(token)
            .then(function (credentials) {
                reply(true);
            })
            .catch(function (err) {
                reply(false);
            })
    } else {
        reply(false);
    }
}

function validateT(jwt) {
    return new Promise(function (resolve, reject) {
        Security.validate(jwt, function (err, success, credentials) {
            if (err || !success) {
                reject(err)
            } else {
                resolve(credentials);
            }
        });
    });
};

I want to mock Security.validate(jwt, function (err, success, credentials) to return success. Following is my test case.

it('should pass token validation', async () => {
    const data = {
        token: '1512598739676174ae69792b81583fd210c381c50f',
    };
    const request = generateRequest({query: data,});
    const response = await awaitHandler(users.isValid, request);
    (response).should.eql( true );
});