Added the test for getToken
Added the function body for the function getToken