Test to check that the token is properly generated