Test method of getToken