Adding tests for the token method