unittests and getToken added