Refactor ApiTestCase to get token from ApiQueryTokens