You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: oauth_token_test.rb
    path of file: ./repos/openstreetmap-website/test/models
    
    the code of the file until where you have to start completion: require "test_helper"

class OauthTokenTest < ActiveSupport::TestCase
  ##
  # check that after calling invalidate! on a token, it is invalid.
  def test_token_invalidation
    tok = OauthToken.new
    assert_not_predicate tok, :in
    
  def test_token_authorisation
    tok = RequestToken.create(:client_application => create(:client_application))
    assert_not_predicate tok, :authorized?, "Token should be created unauthorised."
    tok.authorize!(create(:user))
    assert_predicate tok, :authorized?, "Token should now be authorised."
    tok.invalidate!
    assert_not_predicate tok, :authorized?, "Token should now be invalid."
  end