getByToken migration

GetByToken and consumes() migration.
Runtime tests are not finished.