#!/usr/bin/env python
"""Test the tei parser"""
from pathlib import Path

import pytest

import colrev.env.environment_manager
import colrev.env.tei_parser

# pylint: disable=line-too-long
# pylint: disable=too-many-lines


@pytest.fixture(scope="module")
def script_loc(request) -> Path:  # type: ignore
    """Return the directory of the currently running test script"""

    return Path(request.fspath).parent


def test_tei(script_loc, tmp_path) -> None:  # type: ignore
    """Test the tei"""
    tei_file = script_loc.parent.joinpath("data/WagnerLukyanenkoParEtAl2022.tei.xml")

    environment_manager = colrev.env.environment_manager.EnvironmentManager()

    tei_doc = colrev.env.tei_parser.TEIParser(
        environment_manager=environment_manager, tei_path=tei_file
    )

    assert "0.7.2" == tei_doc.get_grobid_version()

    assert (
        "Artificial intelligence (AI) is beginning to transform traditional research practices in many areas. In this context, literature reviews stand out because they operate on large and rapidly growing volumes of documents, that is, partially structured (meta)data, and pervade almost every type of paper published in information systems research or related social science disciplines. To familiarize researchers with some of the recent trends in this area, we outline how AI can expedite individual steps of the literature review process. Considering that the use of AI in this context is in an early stage of development, we propose a comprehensive research agenda for AI-based literature reviews (AILRs) in our field. With this agenda, we would like to encourage design science research and a broader constructive discourse on shaping the future of AILRs in research."
        == tei_doc.get_abstract()
    )

    assert {
        "ENTRYTYPE": "article",
        "author": "Wagner, Gerit and Lukyanenko, Roman and Par, Guy and Paré, Guy",
        "doi": "10.1177/02683962211048201",
        "journal": "NA",
        "number": "NA",
        "pages": "NA",
        "title": "Debates and Perspectives Paper",
        "volume": "NA",
        "year": "NA",
    } == tei_doc.get_metadata()

    assert [
        "Artificial intelligence",
        "machine learning",
        "natural language processing",
        "research data management",
        "data infrastructure",
        "automation",
        "literature review",
    ] == tei_doc.get_paper_keywords()

    assert [
        {"surname": "Wagner", "forename": "Gerit"},
        {"surname": "Lukyanenko", "forename": "Roman"},
        {
            "surname": "Par",
            "forename": "Guy",
            "emai": "guy.pare@hec.ca",
            "ORCID": "0000-0001-7425-1994",
        },
        {"surname": "Paré", "forename": "Guy"},
    ] == tei_doc.get_author_details()

    assert [
        {
            "ID": "b0",
            "ENTRYTYPE": "article",
            "tei_id": "b0",
            "author": "Adams, C. E and Polzmacher, S. and Wolff, A.",
            "title": "Systematic reviews: work that needs to be done and not to be done",
            "year": "2013",
            "journal": "Journal of Evidence-Based Medicine",
            "volume": "6",
            "number": "4",
            "pages": "232--235",
        },
        {
            "ID": "b1",
            "ENTRYTYPE": "article",
            "tei_id": "b1",
            "author": "Alter, S.",
            "title": "Architecture of Sysperanto: a model-based ontology of the is field",
            "year": "2005",
            "journal": "Communications of the Association for Information Systems",
            "volume": "15",
            "number": "1",
            "pages": "1--40",
        },
        {
            "ID": "b2",
            "ENTRYTYPE": "article",
            "tei_id": "b2",
            "author": "Alvesson, M. and Sandberg, J.",
            "title": "Generating research questions through problematization",
            "year": "2011",
            "journal": "Management Review",
            "volume": "36",
            "number": "2",
            "pages": "247--271",
        },
        {
            "ID": "b3",
            "ENTRYTYPE": "article",
            "tei_id": "b3",
            "author": "Al-Zubidy, A. and Carver, J. C and Hale, D. P",
            "title": "Vision for SLR tooling infrastructure: prioritizing value-added requirements",
            "year": "2017",
            "journal": "Information and Software Technology",
            "volume": "91",
            "number": "",
            "pages": "72--81",
        },
        {
            "ID": "b4",
            "ENTRYTYPE": "book",
            "tei_id": "b4",
            "author": "Anderson, M. R and Antenucci, D. and Bittorf, V.",
            "title": "Brainwash: a data system for feature engineering",
            "year": "2013",
        },
        {
            "ID": "b5",
            "ENTRYTYPE": "article",
            "tei_id": "b5",
            "author": "Antons, D. and Breidbach, C. F",
            "title": "Big data, big insights? Advancing service innovation and design with machine learning",
            "year": "2017",
            "journal": "Journal of Service Research",
            "volume": "21",
            "number": "1",
            "pages": "17--39",
        },
        {
            "ID": "b6",
            "ENTRYTYPE": "book",
            "tei_id": "b6",
            "author": "Antons, D. and Breidbach, C. F and Joshi, A. M",
            "title": "Computational literature reviews: method, algorithms, and roadmap",
            "year": "2021",
        },
        {
            "ID": "b7",
            "ENTRYTYPE": "article",
            "tei_id": "b7",
            "author": "Avison, D. and Malaurent, J.",
            "title": "Is theory king?: questioning the theory fetish in Information Systems",
            "year": "2014",
            "journal": "Journal of Information Technology",
            "volume": "29",
            "number": "4",
            "pages": "327--336",
        },
        {
            "ID": "b8",
            "ENTRYTYPE": "article",
            "tei_id": "b8",
            "author": "Balducci, B. and Marinova, D.",
            "title": "Unstructured data in marketing",
            "year": "2018",
            "journal": "Journal of the Academy of Marketing Science",
            "volume": "46",
            "number": "4",
            "pages": "557--590",
        },
        {
            "ID": "b9",
            "ENTRYTYPE": "article",
            "tei_id": "b9",
            "author": "Bandara, W. and Furtmueller, E. and Gorbacheva, E.",
            "title": "Achieving rigour in literature reviews: insights from qualitative data analysis and tool-support",
            "year": "2015",
            "journal": "Communications of the Association for Information Systems",
            "volume": "34",
            "number": "8",
            "pages": "154--204",
        },
        {
            "ID": "b10",
            "ENTRYTYPE": "article",
            "tei_id": "b10",
            "author": "Batini, C. and Rula, A. and Scannapieco, M.",
            "title": "From data quality to big data quality",
            "year": "2015",
            "journal": "Journal of Database Management",
            "volume": "26",
            "number": "1",
            "pages": "60--82",
        },
        {
            "ID": "b11",
            "ENTRYTYPE": "article",
            "tei_id": "b11",
            "author": "Bax, L. and Yu, L-M and Ikeda, N.",
            "title": "A systematic comparison of software dedicated to meta-analysis of causal studies",
            "year": "2007",
            "journal": "BMC Medical Research Methodology",
            "volume": "7",
            "number": "1",
            "pages": "1--9",
        },
        {
            "ID": "b12",
            "ENTRYTYPE": "article",
            "tei_id": "b12",
            "author": "Beller, E. and Clark, J. and Tsafnat, G.",
            "title": "Making progress with the automation of systematic reviews: principles of the International Collaboration for the Automation of Systematic Reviews (ICASR)",
            "year": "2018",
            "journal": "Systematic Reviews",
            "volume": "7",
            "number": "1",
            "pages": "1--7",
        },
        {
            "ID": "b13",
            "ENTRYTYPE": "article",
            "tei_id": "b13",
            "author": "Berente, N. and Seidel, S. and Safadi, H.",
            "title": "Research commentarydata-driven computationally intensive theory development",
            "year": "2019",
            "journal": "Information Systems Research",
            "volume": "30",
            "number": "1",
            "pages": "50--64",
        },
        {
            "ID": "b14",
            "ENTRYTYPE": "book",
            "tei_id": "b14",
            "author": "Boell, S. K and Wang, B.",
            "title": "wwwlitbaskets.io, an IT artifact supporting exploratory literature searches for Information Systems research",
            "year": "2019-07",
        },
        {
            "ID": "b15",
            "ENTRYTYPE": "article",
            "tei_id": "b15",
            "author": "Boh, Burton-Jones A and Oborn, W. F and , E.",
            "title": "Editor's Comments: advancing research transparency at MIS quarterly: a pluralistic approach",
            "year": "2021",
            "journal": "MIS Quarterly",
            "volume": "45",
            "number": "2",
            "pages": "iii--xviii",
        },
        {
            "ID": "b16",
            "ENTRYTYPE": "article",
            "tei_id": "b16",
            "author": "Carver, J. C and Hassler, E. and Hernandes, E.",
            "title": "Identifying barriers to the systematic literature review process",
            "year": "2013-10-11",
            "journal": "International symposium on empirical software engineering and measurement",
            "volume": "",
            "number": "",
            "pages": "",
        },
        {
            "ID": "b17",
            "ENTRYTYPE": "book",
            "tei_id": "b17",
            "author": "Castellanos, A. and Castillo, A. and Tremblay, M. C",
            "title": "Improving machine learning performance using conceptual modeling",
            "year": "2021",
        },
        {
            "ID": "b18",
            "ENTRYTYPE": "article",
            "tei_id": "b18",
            "author": "Castelvecchi, D.",
            "title": "Can we open the black box of AI?",
            "year": "2016",
            "journal": "Nature",
            "volume": "538",
            "number": "7623",
            "pages": "20--23",
        },
        {
            "ID": "b19",
            "ENTRYTYPE": "book",
            "tei_id": "b19",
            "author": "Choudhury, P. and Endres, Allen R and , M.",
            "title": "Developing theory using machine learning methods",
            "year": "2018",
        },
        {
            "ID": "b20",
            "ENTRYTYPE": "article",
            "tei_id": "b20",
            "author": "Cooper, H. M",
            "title": "Organizing knowledge syntheses: a taxonomy of literature reviews",
            "year": "1988",
            "journal": "Knowledge in Society",
            "volume": "1",
            "number": "1",
            "pages": "104--126",
        },
        {
            "ID": "b21",
            "ENTRYTYPE": "article",
            "tei_id": "b21",
            "author": "Cram, W. A and Templier, M. and Templier, M.",
            "title": "Re)considering the concept of literature review reproducibility",
            "year": "2020",
            "journal": "Journal of the Association for Information Systems",
            "volume": "21",
            "number": "5",
            "pages": "1103--1114",
        },
        {
            "ID": "b22",
            "ENTRYTYPE": "book",
            "tei_id": "b22",
            "author": "Dalgali, A. and Crowston, K.",
            "title": "Sharing open deep learning models",
            "year": "2019-01-08",
        },
        {
            "ID": "b23",
            "ENTRYTYPE": "article",
            "tei_id": "b23",
            "author": "Dang, Y. and Zhang, Y. and Chen, H.",
            "title": "Arizona literature mapper: an integrated approach to monitor and analyze global bioterrorism research literature",
            "year": "2009",
            "journal": "Journal of the American Society for Information Science and Technology",
            "volume": "60",
            "number": "7",
            "pages": "1466--1485",
        },
        {
            "ID": "b24",
            "ENTRYTYPE": "book",
            "tei_id": "b24",
            "author": "Dörpinghaus, J. and , Stefan A",
            "title": "Knowledge extraction and applications utilizing context data in knowledge graphs",
            "year": "2019-09-01",
        },
        {
            "ID": "b25",
            "ENTRYTYPE": "article",
            "tei_id": "b25",
            "author": "Dubé, L. and Paré, G.",
            "title": "Rigor in information systems positivist case research: current practices, trends, and recommendations",
            "year": "2003",
            "journal": "MIS Quarterly",
            "volume": "27",
            "number": "4",
            "pages": "597--636",
        },
        {
            "ID": "b26",
            "ENTRYTYPE": "book",
            "tei_id": "b26",
            "author": "Duboue, P.",
            "title": "The Art of Feature Engineering: Essentials for Machine Learning",
            "year": "2020",
        },
        {
            "ID": "b27",
            "ENTRYTYPE": "book",
            "tei_id": "b27",
            "author": "Eisenstein, J.",
            "title": "Introduction to Natural Language Processing",
            "year": "2019",
        },
        {
            "ID": "b28",
            "ENTRYTYPE": "article",
            "tei_id": "b28",
            "author": "Endicott, J. and Larsen, K. and Lukyanenko, R.",
            "title": "Integrating scientific research: Theory and design of discovering similar constructs",
            "year": "2017",
            "journal": "AIS SIGSAND Symposium",
            "volume": "",
            "number": "",
            "pages": "1--7",
        },
        {
            "ID": "b29",
            "ENTRYTYPE": "article",
            "tei_id": "b29",
            "author": "Evans, J. A and Foster, J. G",
            "title": "",
            "year": "2011",
            "journal": "Metaknowledge. Science",
            "volume": "331",
            "number": "11",
            "pages": "721--725",
        },
        {
            "ID": "b30",
            "ENTRYTYPE": "article",
            "tei_id": "b30",
            "author": "Germonprez, M. and Hovorka, D. and Hovorka, D.",
            "title": "A theory of tailorable technology design",
            "year": "2007",
            "journal": "Journal of the Association for Information Systems",
            "volume": "8",
            "number": "6",
            "pages": "351--367",
        },
        {
            "ID": "b31",
            "ENTRYTYPE": "book",
            "tei_id": "b31",
            "author": "Gleasure, R.",
            "title": "Conceptual design science research? How and why untested meta-artifacts have a place in IS",
            "year": "2014",
        },
        {
            "ID": "b32",
            "ENTRYTYPE": "book",
            "tei_id": "b32",
            "author": "Goodfellow, I. and Bengio, Y. and Courville, A.",
            "title": "Deep Learning, Adaptive Computation and Machine Learning Series",
            "year": "2016",
        },
        {
            "ID": "b33",
            "ENTRYTYPE": "article",
            "tei_id": "b33",
            "author": "Gunning, D. and Aha, D.",
            "title": "DARPA's Explainable Artificial Intelligence (XAI) Program",
            "year": "2019",
            "journal": "AI Magazine",
            "volume": "40",
            "number": "2",
            "pages": "44--58",
        },
        {
            "ID": "b34",
            "ENTRYTYPE": "book",
            "tei_id": "b34",
            "author": "Hake, P. and Fettke, P. and Neumann, G.",
            "title": "Extracting business objects and activities from labels of German process models",
            "year": "2017-06-01",
        },
        {
            "ID": "b35",
            "ENTRYTYPE": "article",
            "tei_id": "b35",
            "author": "Harrison, H. and Griffin, S. J and Kuhn, I.",
            "title": "Software tools to support title and abstract screening for systematic reviews in healthcare: an evaluation",
            "year": "2020",
            "journal": "BMC Medical Research Methodology",
            "volume": "20",
            "number": "7",
            "pages": "1--12",
        },
        {
            "ID": "b36",
            "ENTRYTYPE": "article",
            "tei_id": "b36",
            "author": "Hartling, L. and Ospina, M. and Liang, Y.",
            "title": "Risk of bias versus quality assessment of randomised controlled trials: cross sectional study",
            "year": "2009",
            "journal": "British Medical Journal",
            "volume": "339",
            "number": "1",
            "pages": "1--6",
        },
        {
            "ID": "b37",
            "ENTRYTYPE": "book",
            "tei_id": "b37",
            "author": "Hassan, N. R and Prester, J. and Wagner, G.",
            "title": "Seeking out clear and unique Information Systems Concepts: a natural language processing approach",
            "year": "2020-06",
        },
        {
            "ID": "b38",
            "ENTRYTYPE": "article",
            "tei_id": "b38",
            "author": "Higgins, Jpt and Green, S.",
            "title": "Interactive machine learning for health informatics: when do we need the human-in-the-loop?",
            "year": "2008",
            "journal": "Brain Informatics",
            "volume": "3",
            "number": "2",
            "pages": "119--131",
        },
        {
            "ID": "b39",
            "ENTRYTYPE": "article",
            "tei_id": "b39",
            "author": "Hossain, M. S and Gresock, J. and Edmonds, Y.",
            "title": "Connecting the dots between PubMed abstracts",
            "year": "2012",
            "journal": "PLoS One",
            "volume": "7",
            "number": "1",
            "pages": "1--23",
        },
        {
            "ID": "b40",
            "ENTRYTYPE": "book",
            "tei_id": "b40",
            "author": "Hunter, J. E and Schmidt, F. L",
            "title": "Methods of Meta-Analysis: Correcting Error and Bias in Research Findings",
            "year": "2014",
        },
        {
            "ID": "b41",
            "ENTRYTYPE": "article",
            "tei_id": "b41",
            "author": "Hutson, M.",
            "title": "Has artificial intelligence become alchemy?",
            "year": "2018",
            "journal": "Science",
            "volume": "360",
            "number": "6388",
            "pages": "478--479",
        },
        {
            "ID": "b42",
            "ENTRYTYPE": "article",
            "tei_id": "b42",
            "author": "Hutson, M.",
            "title": "Artificial intelligence faces reproducibility crisis",
            "year": "2018",
            "journal": "Science",
            "volume": "359",
            "number": "6377",
            "pages": "725--726",
        },
        {
            "ID": "b43",
            "ENTRYTYPE": "book",
            "tei_id": "b43",
            "author": "Jalali, S. and Wohlin, C.",
            "title": "Systematic literature studies: database searches vs. backward snowballing",
            "year": "2012-09-20",
        },
        {
            "ID": "b44",
            "ENTRYTYPE": "article",
            "tei_id": "b44",
            "author": "Johnson, C. D and Bauer, B. C and Niederman, F.",
            "title": "The Automation of Management and Business Science. Academy of Management",
            "year": "2019",
            "journal": "Perspectives",
            "volume": "35",
            "number": "2",
            "pages": "292--309",
        },
        {
            "ID": "b45",
            "ENTRYTYPE": "book",
            "tei_id": "b45",
            "author": "Jones, M.",
            "title": "How do we address the reproducibility crisis in artificial intelligence? Forbes",
            "year": "2018",
        },
        {
            "ID": "b46",
            "ENTRYTYPE": "article",
            "tei_id": "b46",
            "author": "Jonnalagadda, S. R and Goyal, P. and Huffman, M. D",
            "title": "Automating data extraction in systematic reviews: a systematic review",
            "year": "2015",
            "journal": "Systematic Reviews",
            "volume": "4",
            "number": "1",
            "pages": "",
        },
        {
            "ID": "b47",
            "ENTRYTYPE": "article",
            "tei_id": "b47",
            "author": "Kallinikos, J. and Tempini, N.",
            "title": "Patient data as medical facts: social media practices as a foundation for medical knowledge creation",
            "year": "2014",
            "journal": "Information Systems Research",
            "volume": "25",
            "number": "4",
            "pages": "817--833",
        },
        {
            "ID": "b48",
            "ENTRYTYPE": "book",
            "tei_id": "b48",
            "author": "Kenett, R. S and Shmueli, G.",
            "title": "Information Quality: The Potential of Data and Analytics to Generate Knowledge",
            "year": "2016",
        },
        {
            "ID": "b49",
            "ENTRYTYPE": "article",
            "tei_id": "b49",
            "author": "King, R. D and Rowland, J. and Oliver, S. G",
            "title": "The automation of science",
            "year": "2009",
            "journal": "Science",
            "volume": "324",
            "number": "5923",
            "pages": "85--89",
        },
        {
            "ID": "b50",
            "ENTRYTYPE": "book",
            "tei_id": "b50",
            "author": "Kitchenham, B. A and Charters, S.",
            "title": "Guidelines for performing systematic literature reviews in software engineering",
            "year": "2007",
        },
        {
            "ID": "b51",
            "ENTRYTYPE": "article",
            "tei_id": "b51",
            "author": "Klein, H. K and Myers, M. D",
            "title": "A set of principles for conducting and evaluating interpretive field studies in information systems",
            "year": "1999",
            "journal": "MIS Quarterly",
            "volume": "23",
            "number": "1",
            "pages": "67--94",
        },
        {
            "ID": "b52",
            "ENTRYTYPE": "book",
            "tei_id": "b52",
            "author": "Knight, W.",
            "title": "Darpa Is Funding Projects that Will Try to Open up AI's Black Boxes. MIT Technology Review",
            "year": "2017-09-25",
        },
        {
            "ID": "b53",
            "ENTRYTYPE": "article",
            "tei_id": "b53",
            "author": "Kobayashi, V. B and Mol, S. T and Berkers, H. A",
            "title": "Text mining in organizational research",
            "year": "2017",
            "journal": "Organizational Research Methods",
            "volume": "21",
            "number": "3",
            "pages": "733--765",
        },
        {
            "ID": "b54",
            "ENTRYTYPE": "article",
            "tei_id": "b54",
            "author": "Kohl, C. and Mcintosh, E. J and Unger, S.",
            "title": "Online tools supporting the conduct and reporting of systematic reviews and systematic maps: a case study on cadima and review of existing tools",
            "year": "2018",
            "journal": "Environmental Evidence",
            "volume": "7",
            "number": "8",
            "pages": "1--17",
        },
        {
            "ID": "b55",
            "ENTRYTYPE": "book",
            "tei_id": "b55",
            "author": "Kruse, Chandra and Seidel, L. and Vom Brocke, S. and , J.",
            "title": "Design archaeology: Generating design knowledge from real-world artifact design",
            "year": "2019-06-04",
        },
        {
            "ID": "b56",
            "ENTRYTYPE": "article",
            "tei_id": "b56",
            "author": "Kunc, M. and Mortenson, M. J and Vidgen, R.",
            "title": "A computational literature review of the field of system dynamics from 1974 to",
            "year": "2017",
            "journal": "Journal of Simulation",
            "volume": "12",
            "number": "2",
            "pages": "115--127",
        },
        {
            "ID": "b57",
            "ENTRYTYPE": "article",
            "tei_id": "b57",
            "author": "Larsen, K. R and Bong, Bong Ch and , C. H",
            "title": "A tool for addressing construct identity in literature reviews and meta-analyses",
            "year": "2016",
            "journal": "MIS Quarterly",
            "volume": "40",
            "number": "3",
            "pages": "529--551",
        },
        {
            "ID": "b58",
            "ENTRYTYPE": "article",
            "tei_id": "b58",
            "author": "Larsen, K. and Hovorka, D. and Dennis, A. R",
            "title": "Understanding the elephant: the discourse approach to boundary identification and corpus construction for theory review articles",
            "year": "2019",
            "journal": "Journal of the Association for Information Systems",
            "volume": "20",
            "number": "7",
            "pages": "887--928",
        },
        {
            "ID": "b59",
            "ENTRYTYPE": "book",
            "tei_id": "b59",
            "author": "Larsen, K. and Lukyanenko, R. and Muller, R.",
            "title": "Validity in design science research",
            "year": "2020-12-02",
        },
        {
            "ID": "b60",
            "ENTRYTYPE": "article",
            "tei_id": "b60",
            "author": "Laurell, C. and Sandström, C. and Berthold, A.",
            "title": "Exploring barriers to adoption of virtual reality through social media analytics and machine learning-an assessment of technology, network, price and trialability",
            "year": "2019",
            "journal": "Journal of Business Research",
            "volume": "100",
            "number": "",
            "pages": "469--474",
        },
        {
            "ID": "b61",
            "ENTRYTYPE": "article",
            "tei_id": "b61",
            "author": "Leidner, D. E",
            "title": "Review and theory symbiosis: an introspective retrospective",
            "year": "2018",
            "journal": "Journal of the Association for Information Systems",
            "volume": "19",
            "number": "6",
            "pages": "552--567",
        },
        {
            "ID": "b62",
            "ENTRYTYPE": "article",
            "tei_id": "b62",
            "author": "Li, J. and Larsen, K. and Abbasi, A.",
            "title": "TheoryOn: a design framework and system for unlocking behavioral knowledge through ontology learning",
            "year": "2020",
            "journal": "MIS Quarterly",
            "volume": "44",
            "number": "4",
            "pages": "1733--1772",
        },
        {
            "ID": "b63",
            "ENTRYTYPE": "article",
            "tei_id": "b63",
            "author": "Lindberg, A.",
            "title": "Developing theory through integrating human and machine pattern recognition",
            "year": "2020",
            "journal": "Journal of the Association for Information Systems",
            "volume": "21",
            "number": "1",
            "pages": "90--116",
        },
        {
            "ID": "b64",
            "ENTRYTYPE": "book",
            "tei_id": "b64",
            "author": "Lindzey, G. and Gilbert, D. and St, Fiske",
            "title": "The Handbook of Social Psychology",
            "year": "1998",
        },
        {
            "ID": "b65",
            "ENTRYTYPE": "book",
            "tei_id": "b65",
            "author": "Lukyanenko, R.",
            "title": "A journey to BSO: evaluating earlier and more recent ideas of Mario Bunge as a foundation for information and software development",
            "year": "2020",
        },
        {
            "ID": "b66",
            "ENTRYTYPE": "article",
            "tei_id": "b66",
            "author": "Lukyanenko, R. and Parsons, J. and Parsons, J.",
            "title": "Research perspectives: design theory indeterminacy: what Is it, how can it be reduced, and why did the polar bear drown",
            "year": "2020",
            "journal": "Journal of the Association for Information Systems",
            "volume": "21",
            "number": "5",
            "pages": "1343--1369",
        },
        {
            "ID": "b67",
            "ENTRYTYPE": "article",
            "tei_id": "b67",
            "author": "Lukyanenko, R. and Parsons, J. and Wiersma, Y. F",
            "title": "Expecting the unexpected: effects of data collection design choices on the quality of crowdsourced user-generated content",
            "year": "2019",
            "journal": "MIS Quarterly",
            "volume": "43",
            "number": "2",
            "pages": "623--648",
        },
        {
            "ID": "b68",
            "ENTRYTYPE": "article",
            "tei_id": "b68",
            "author": "Maass, W. and Parsons, J. and Purao, S.",
            "title": "Data-driven meets theory-driven research in the era of big data: opportunities and challenges for Information Systems research",
            "year": "2018",
            "journal": "Journal of the Association for Information Systems",
            "volume": "19",
            "number": "12",
            "pages": "1253--1273",
        },
        {
            "ID": "b69",
            "ENTRYTYPE": "book",
            "tei_id": "b69",
            "author": "Manning, C. D and Schütze, H.",
            "title": "Toward a social ontology for conceptual modeling",
            "year": "1999-03",
        },
        {
            "ID": "b70",
            "ENTRYTYPE": "article",
            "tei_id": "b70",
            "author": "Marshall, I. J and Bc, Wallace",
            "title": "Toward systematic review automation: a practical guide to using machine learning tools in research synthesis",
            "year": "2019",
            "journal": "Systematic Reviews",
            "volume": "8",
            "number": "1",
            "pages": "",
        },
        {
            "ID": "b71",
            "ENTRYTYPE": "article",
            "tei_id": "b71",
            "author": "Marshall, I. J and Kuiper, J. and Bc, Wallace",
            "title": "RobotReviewer: evaluation of a system for automatically assessing bias in clinical trials",
            "year": "2015",
            "journal": "Journal of the American Medical Informatics Association",
            "volume": "23",
            "number": "1",
            "pages": "193--201",
        },
        {
            "ID": "b72",
            "ENTRYTYPE": "book",
            "tei_id": "b72",
            "author": "Mitchell, T. M",
            "title": "Machine learning",
            "year": "1997",
        },
        {
            "ID": "b73",
            "ENTRYTYPE": "article",
            "tei_id": "b73",
            "author": "Mortenson, M. J and Vidgen, R.",
            "title": "A computational literature review of the technology acceptance model",
            "year": "2016",
            "journal": "International Journal of Information Management",
            "volume": "36",
            "number": "6",
            "pages": "1248--1259",
        },
        {
            "ID": "b74",
            "ENTRYTYPE": "book",
            "tei_id": "b74",
            "author": "Müller-Bloch, C. and Kranz, J.",
            "title": "A framework for rigorously identifying research gaps in qualitative literature reviews",
            "year": "2015-12-16",
        },
        {
            "ID": "b75",
            "ENTRYTYPE": "article",
            "tei_id": "b75",
            "author": "Nakagawa, S. and Samarasinghe, G. and Haddaway, N. R",
            "title": "Research weaving: visualizing the future of research synthesis",
            "year": "2019",
            "journal": "Trends in Ecology & Evolution",
            "volume": "34",
            "number": "3",
            "pages": "224--238",
        },
        {
            "ID": "b76",
            "ENTRYTYPE": "article",
            "tei_id": "b76",
            "author": "Nelson, L. K",
            "title": "Computational grounded theory: a methodological framework",
            "year": "2020",
            "journal": "Sociological Methods & Research",
            "volume": "49",
            "number": "1",
            "pages": "3--42",
        },
        {
            "ID": "b77",
            "ENTRYTYPE": "article",
            "tei_id": "b77",
            "author": "O'connor, A. M and Tsafnat, G. and Gilbert, S. B",
            "title": "Moving toward the automation of the systematic review process: a summary of discussions at the second meeting of the International Collaboration for the Automation of Systematic Reviews (ICASR)",
            "year": "2018",
            "journal": "Systematic Reviews",
            "volume": "7",
            "number": "3",
            "pages": "1--5",
        },
        {
            "ID": "b78",
            "ENTRYTYPE": "article",
            "tei_id": "b78",
            "author": "O'mara-Eves, A. and Thomas, J. and Mcnaught, J.",
            "title": "Using text mining for study identification in systematic reviews: a systematic review of current approaches",
            "year": "2015",
            "journal": "Systematic Reviews",
            "volume": "4",
            "number": "",
            "pages": "",
        },
        {
            "ID": "b79",
            "ENTRYTYPE": "article",
            "tei_id": "b79",
            "author": "Papaioannou, D. and Sutton, A. and Carroll, C.",
            "title": "Literature searching for social science systematic reviews: consideration of a range of search techniques",
            "year": "2009",
            "journal": "Health Information & Libraries Journal",
            "volume": "27",
            "number": "2",
            "pages": "114--122",
        },
        {
            "ID": "b80",
            "ENTRYTYPE": "article",
            "tei_id": "b80",
            "author": "Paré, G. and Cameron, A-F and Poba-Nzaou, P.",
            "title": "A systematic assessment of rigor in information systems ranking-type Delphi studies",
            "year": "2013",
            "journal": "Information & Management",
            "volume": "50",
            "number": "5",
            "pages": "207--217",
        },
        {
            "ID": "b81",
            "ENTRYTYPE": "article",
            "tei_id": "b81",
            "author": "Paré, G. and Tate, M. and Johnstone, D.",
            "title": "Contextualizing the twin concepts of systematicity and transparency in information systems literature reviews",
            "year": "2016",
            "journal": "European Journal of Information Systems",
            "volume": "25",
            "number": "6",
            "pages": "493--508",
        },
        {
            "ID": "b82",
            "ENTRYTYPE": "article",
            "tei_id": "b82",
            "author": "Pinsonneault, A. and Kraemer, K.",
            "title": "Survey research methodology in management information systems: an assessment",
            "year": "1993",
            "journal": "Journal of Management Information Systems",
            "volume": "10",
            "number": "2",
            "pages": "75--105",
        },
        {
            "ID": "b83",
            "ENTRYTYPE": "article",
            "tei_id": "b83",
            "author": "Prester, J. and Wagner, G. and Schryen, G.",
            "title": "Classifying the ideational impact of Information Systems review articles: a content-enriched deep learning approach",
            "year": "2020",
            "journal": "Decision Support Systems",
            "volume": "140",
            "number": "",
            "pages": "",
        },
        {
            "ID": "b84",
            "ENTRYTYPE": "book",
            "tei_id": "b84",
            "author": "Raganato, A. and Bovi, C. D and Navigli, R.",
            "title": "Neural sequence learning models for word sense disambiguation",
            "year": "2017-09-07",
        },
        {
            "ID": "b85",
            "ENTRYTYPE": "article",
            "tei_id": "b85",
            "author": "Rai, A.",
            "title": "Editor's comments: synergies between big data and theory",
            "year": "2016",
            "journal": "MIS Quarterly",
            "volume": "40",
            "number": "2",
            "pages": "",
        },
        {
            "ID": "b86",
            "ENTRYTYPE": "article",
            "tei_id": "b86",
            "author": "Raisch, S. and Krakowski, S.",
            "title": "Artificial intelligence and management: the automation-augmentation paradox",
            "year": "2020",
            "journal": "Academy of Management Review",
            "volume": "46",
            "number": "1",
            "pages": "192--210",
        },
        {
            "ID": "b87",
            "ENTRYTYPE": "article",
            "tei_id": "b87",
            "author": "Rivard, S.",
            "title": "Editor's comments: the ions of theory construction",
            "year": "2014",
            "journal": "MIS Quarterly",
            "volume": "38",
            "number": "2",
            "pages": "",
        },
        {
            "ID": "b88",
            "ENTRYTYPE": "book",
            "tei_id": "b88",
            "author": "Russell, S. J and Norvig, P.",
            "title": "Artificial Intelligence: A Modern Approach",
            "year": "2016",
        },
        {
            "ID": "b89",
            "ENTRYTYPE": "article",
            "tei_id": "b89",
            "author": "Shokraneh, Russell-Rose T and , F.",
            "title": "Facilitating reproducible and valid searching in evidence synthesis",
            "year": "2019",
            "journal": "BMJ Evidence-Based Medicine",
            "volume": "2",
            "number": "1",
            "pages": "",
        },
        {
            "ID": "b90",
            "ENTRYTYPE": "article",
            "tei_id": "b90",
            "author": "Schmiedel, T. and Müller, O. and Vom Brocke, J.",
            "title": "Topic modeling as a strategy of inquiry in organizational research: A tutorial with an application example on organizational culture",
            "year": "2019",
            "journal": "Organizational Research Methods",
            "volume": "22",
            "number": "4",
            "pages": "941--968",
        },
        {
            "ID": "b91",
            "ENTRYTYPE": "article",
            "tei_id": "b91",
            "author": "Schryen, G. and Wagner, G. and Benlian, A.",
            "title": "A knowledge development perspective on literature reviews: validation of a new typology in the IS field",
            "year": "2020",
            "journal": "Communications of the Association for Information Systems",
            "volume": "46",
            "number": "",
            "pages": "134--168",
        },
        {
            "ID": "b92",
            "ENTRYTYPE": "article",
            "tei_id": "b92",
            "author": "Seeber, I. and Bittner, E. and Briggs, R. O",
            "title": "Machines as teammates: a research agenda on AI in team collaboration",
            "year": "2020",
            "journal": "Information & Management",
            "volume": "57",
            "number": "2",
            "pages": "1--22",
        },
        {
            "ID": "b93",
            "ENTRYTYPE": "article",
            "tei_id": "b93",
            "author": "Shamliyan, T. and Kane, R. L and Dickinson, S.",
            "title": "A systematic review of tools used to assess the quality of observational studies that examine incidence or prevalence and risk factors for diseases",
            "year": "2010",
            "journal": "Journal of Clinical Epidemiology",
            "volume": "63",
            "number": "10",
            "pages": "1061--1070",
        },
        {
            "ID": "b94",
            "ENTRYTYPE": "article",
            "tei_id": "b94",
            "author": "Sidorova, A. and Evangelopoulos, N. and Valacich, J. S",
            "title": "Uncovering the intellectual core of the information systems discipline",
            "year": "2008",
            "journal": "MIS Quarterly",
            "volume": "32",
            "number": "3",
            "pages": "467--482",
        },
        {
            "ID": "b95",
            "ENTRYTYPE": "article",
            "tei_id": "b95",
            "author": "Small, H. G",
            "title": "Cited documents as concept symbols",
            "year": "1978",
            "journal": "Social Studies of Science",
            "volume": "8",
            "number": "3",
            "pages": "327--340",
        },
        {
            "ID": "b96",
            "ENTRYTYPE": "book",
            "tei_id": "b96",
            "author": "Stanovsky, G. and Eckle-Kohler, J. and Puzikov, Y.",
            "title": "Integrating deep linguistic features in factuality prediction over unified datasets",
            "year": "2017-07-30",
        },
        {
            "ID": "b97",
            "ENTRYTYPE": "article",
            "tei_id": "b97",
            "author": "Sturm, B. and Sunyaev, A.",
            "title": "Design principles for systematic search systems: a holistic synthesis of a rigorous multi-cycle design science research journey",
            "year": "2018",
            "journal": "Business & Information Systems Engineering",
            "volume": "61",
            "number": "1",
            "pages": "91--111",
        },
        {
            "ID": "b98",
            "ENTRYTYPE": "article",
            "tei_id": "b98",
            "author": "Swanson, D. R and Smalheiser, N. R",
            "title": "An interactive system for finding complementary literatures: a stimulus to scientific discovery",
            "year": "1997",
            "journal": "Artificial Intelligence",
            "volume": "91",
            "number": "2",
            "pages": "183--203",
        },
        {
            "ID": "b99",
            "ENTRYTYPE": "article",
            "tei_id": "b99",
            "author": "Tate, W. L and Ellram, L. M and Kirchoff, J. F",
            "title": "Corporate social responsibility reports: a thematic analysis related to supply chain management",
            "year": "2010",
            "journal": "Journal of Supply Chain Management",
            "volume": "46",
            "number": "1",
            "pages": "19--44",
        },
        {
            "ID": "b100",
            "ENTRYTYPE": "article",
            "tei_id": "b100",
            "author": "Taulli, T. and Oni, M.",
            "title": "",
            "year": "2019",
            "journal": "Artificial Intelligence Basics",
            "volume": "",
            "number": "",
            "pages": "",
        },
        {
            "ID": "b101",
            "ENTRYTYPE": "article",
            "tei_id": "b101",
            "author": "Templier, M. and Paré, G.",
            "title": "Transparency in literature reviews: an assessment of reporting practices across review types and genres in top IS journals",
            "year": "2018",
            "journal": "European Journal of Information Systems",
            "volume": "27",
            "number": "5",
            "pages": "503--550",
        },
        {
            "ID": "b102",
            "ENTRYTYPE": "article",
            "tei_id": "b102",
            "author": "Thilakaratne, M. and Falkner, K. and Atapattu, T.",
            "title": "A systematic review on literature-based discovery: general overview, methodology, & statistical analysis",
            "year": "2019",
            "journal": "ACM Computing Surveys",
            "volume": "52",
            "number": "6",
            "pages": "1--34",
        },
        {
            "ID": "b103",
            "ENTRYTYPE": "article",
            "tei_id": "b103",
            "author": "Thomas, J. and Noel-Storr, A. and Marshall, I.",
            "title": "Living systematic reviews: 2. Combining human and machine effort",
            "year": "2017",
            "journal": "Journal of Clinical Epidemiology",
            "volume": "91",
            "number": "",
            "pages": "31--37",
        },
        {
            "ID": "b104",
            "ENTRYTYPE": "book",
            "tei_id": "b104",
            "author": "Tkaczyk, D. and Collins, A. and Sheridan, P.",
            "title": "Machine learning vs. Rules and out-of-the-box vs. retrained",
            "year": "2018",
        },
        {
            "ID": "b105",
            "ENTRYTYPE": "article",
            "tei_id": "b105",
            "author": "Tremblay, M. C and Der Meer, Van and Beck, D. and , R.",
            "title": "The effects of the quantification of faculty productivity: perspectives from the design science research community",
            "year": "2018",
            "journal": "Communications of the Association for Information Systems",
            "volume": "43",
            "number": "",
            "pages": "625--661",
        },
        {
            "ID": "b106",
            "ENTRYTYPE": "article",
            "tei_id": "b106",
            "author": "Tsafnat, G. and Glasziou, P. and Choong, M. K",
            "title": "Systematic review automation technologies",
            "year": "2014",
            "journal": "Systematic Reviews",
            "volume": "3",
            "number": "",
            "pages": "1--15",
        },
        {
            "ID": "b107",
            "ENTRYTYPE": "article",
            "tei_id": "b107",
            "author": "Van De Schoot, R. and De Bruin, J. and Schram, R.",
            "title": "An open source machine learning framework for efficient and transparent systematic reviews",
            "year": "2021",
            "journal": "Nature Machine Intelligence",
            "volume": "3",
            "number": "",
            "pages": "125--133",
        },
        {
            "ID": "b108",
            "ENTRYTYPE": "article",
            "tei_id": "b108",
            "author": "Van Dinter, R. and Catal, Tekinerdogan B and , C.",
            "title": "Automation of systematic literature reviews: a systematic literature review",
            "year": "2021",
            "journal": "Information and Software Technology",
            "volume": "136",
            "number": "",
            "pages": "",
        },
        {
            "ID": "b109",
            "ENTRYTYPE": "article",
            "tei_id": "b109",
            "author": "Vom Brocke, J. and Simons, A. and Riemer, K.",
            "title": "Standing on the shoulders of giants: challenges and recommendations of literature search in information systems research",
            "year": "2015",
            "journal": "Communications of the Association for Information Systems",
            "volume": "37",
            "number": "9",
            "pages": "205--224",
        },
        {
            "ID": "b110",
            "ENTRYTYPE": "article",
            "tei_id": "b110",
            "author": "Wahyudi, A. and Kuk, G. and Janssen, M.",
            "title": "A process pattern model for tackling and improving big data quality",
            "year": "2018",
            "journal": "Information Systems Frontiers",
            "volume": "20",
            "number": "3",
            "pages": "457--469",
        },
        {
            "ID": "b111",
            "ENTRYTYPE": "book",
            "tei_id": "b111",
            "author": "Wallace, B. C and Small, K. and Brodley, C. E",
            "title": "Deploying an interactive machine learning system in an evidence-based practice center: Abstrackr",
            "year": "2012",
        },
        {
            "ID": "b112",
            "ENTRYTYPE": "book",
            "tei_id": "b112",
            "author": "Wand, Y. and Weber, R.",
            "title": "An ontological analysis of some fundamental information systems concepts",
            "year": "1988",
        },
        {
            "ID": "b113",
            "ENTRYTYPE": "article",
            "tei_id": "b113",
            "author": "Wang, Z. and Nayfeh, T. and Tetzlaff, J.",
            "title": "Error rates of human reviewers during abstract screening in systematic reviews",
            "year": "2020",
            "journal": "PLoS One",
            "volume": "15",
            "number": "1",
            "pages": "",
        },
        {
            "ID": "b114",
            "ENTRYTYPE": "article",
            "tei_id": "b114",
            "author": "Van Zoonen, W. and Der Meer, Van and , Tgla",
            "title": "Social media research: the application of supervised machine learning in organizational communication research",
            "year": "2016",
            "journal": "Computers in Human Behavior",
            "volume": "63",
            "number": "",
            "pages": "132--141",
        },
        {
            "ID": "b115",
            "ENTRYTYPE": "article",
            "tei_id": "b115",
            "author": "Webster, J. and Watson, R. T",
            "title": "Analyzing the past to prepare for the future: writing a literature review",
            "year": "2002",
            "journal": "MIS Quarterly",
            "volume": "26",
            "number": "2",
            "pages": "xiii--xxiii",
        },
        {
            "ID": "b116",
            "ENTRYTYPE": "article",
            "tei_id": "b116",
            "author": "Whetten, D. A",
            "title": "What constitutes a theoretical contribution?",
            "year": "1989",
            "journal": "Academy of Management Review",
            "volume": "14",
            "number": "4",
            "pages": "490--495",
        },
        {
            "ID": "b117",
            "ENTRYTYPE": "article",
            "tei_id": "b117",
            "author": "Xu, J. and Benbasat, I. and Benbasat, I.",
            "title": "Integrating service quality with system and information quality: an empirical test in the e-service context",
            "year": "2013",
            "journal": "MIS Quarterly",
            "volume": "37",
            "number": "3",
            "pages": "777--794",
        },
    ] == tei_doc.get_bibliography()

    assert [
        {
            "ID": "b58",
            "ENTRYTYPE": "article",
            "tei_id": "b58",
            "author": "Larsen, K. and Hovorka, D. and Dennis, A. R",
            "title": "Understanding the elephant: the discourse approach to boundary identification and corpus construction for theory review articles",
            "year": "2019",
            "journal": "Journal of the Association for Information Systems",
            "volume": "20",
            "number": "7",
            "pages": "887--928",
        },
        {
            "ID": "b62",
            "ENTRYTYPE": "article",
            "tei_id": "b62",
            "author": "Li, J. and Larsen, K. and Abbasi, A.",
            "title": "TheoryOn: a design framework and system for unlocking behavioral knowledge through ontology learning",
            "year": "2020",
            "journal": "MIS Quarterly",
            "volume": "44",
            "number": "4",
            "pages": "1733--1772",
        },
        {
            "ID": "b101",
            "ENTRYTYPE": "article",
            "tei_id": "b101",
            "author": "Templier, M. and Paré, G.",
            "title": "Transparency in literature reviews: an assessment of reporting practices across review types and genres in top IS journals",
            "year": "2018",
            "journal": "European Journal of Information Systems",
            "volume": "27",
            "number": "5",
            "pages": "503--550",
        },
    ] == tei_doc.get_bibliography(min_intext_citations=6)

    assert {
        "introduction": [
            "b0",
            "b106",
            "b49",
            "b44",
            "b105",
            "b68",
            "b44",
            "b58",
            "b91",
            "b58",
            "b92",
            "b88",
            "b100",
            "b32",
            "b72",
            "b69",
            "b94",
            "b73",
            "b58",
        ],
        "artificial intelligence-based support for the literature review process": [
            "b106",
            "b101",
            "b3",
            "b35",
            "b46",
            "b54",
            "b70",
            "b106",
            "b108",
            "b71",
            "b101",
            "b74",
            "b87",
            "b49",
            "b102",
            "b62",
            "b2",
            "b29",
            "b98",
            "b5",
            "b101",
            "b20",
            "b81",
            "b101",
            "b21",
            "b62",
            "b14",
            "b97",
            "b16",
            "b44",
            "b58",
            "b101",
            "b101",
            "b35",
            "b107",
            "b58",
            "b58",
            "b62",
            "b16",
            "b113",
            "b38",
            "b50",
            "b101",
            "b101",
            "b36",
            "b11",
            "b71",
            "b101",
            "b46",
            "b101",
            "b91",
            "b53",
            "b8",
            "b75",
            "b102",
            "b60",
            "b99",
            "b13",
            "b63",
            "b76",
            "b11",
            "b56",
            "b73",
            "b90",
            "b6",
            "b13",
            "b44",
            "b116",
        ],
        "level i: supporting infrastructure": [
            "b58",
            "b23",
            "b6",
            "b10",
            "b48",
            "b67",
            "b110",
            "b89",
            "b27",
            "b1",
            "b65",
            "b62",
            "b109",
            "b112",
            "b109",
            "b21",
            "b79",
            "b101",
            "b97",
            "b22",
            "b31",
            "b55",
        ],
        "level ii: methods and tools": [
            "b85",
            "b30",
            "b47",
            "b67",
            "b74",
            "b106",
            "b43",
            "b79",
            "b101",
            "b89",
            "b58",
            "b78",
            "b107",
            "b111",
            "b103",
            "b106",
            "b101",
            "b101",
            "b38",
            "b40",
            "b71",
            "b93",
            "b82",
            "b25",
            "b80",
            "b46",
            "b7",
            "b51",
            "b58",
            "b83",
            "b62",
            "b37",
            "b95",
            "b24",
            "b84",
            "b96",
            "b113",
            "b117",
            "b57",
            "b58",
            "b83",
            "b34",
            "b62",
            "b61",
            "b87",
            "b115",
            "b13",
            "b19",
            "b76",
            "b39",
            "b62",
            "b64",
            "b81",
            "b78",
            "b57",
            "b83",
            "b59",
            "b59",
            "b15",
            "b81",
            "b101",
            "b21",
            "b18",
            "b41",
            "b4",
            "b26",
            "b17",
            "b42",
            "b45",
            "b21",
            "b18",
            "b33",
            "b52",
            "b12",
            "b3",
            "b30",
            "b77",
            "b70",
            "b107",
            "b86",
            "b92",
        ],
        "level iii: research practice": [
            "b94",
            "b28",
            "b57",
            "b7",
            "b51",
            "b66",
            "b68",
            "b15",
            "b68",
            "b15",
        ],
        "concluding remarks": ["b61", "b87", "b115"],
    } == tei_doc.get_citations_per_section()

    # change tei_path to prevent changes to the original tei file
    tei_doc.tei_path = tmp_path / Path("test.tei.xml")
    tei_doc.mark_references(
        records={
            "TEST_ID": {
                "ID": "TEST_ID",
                "ENTRYTYPE": "article",
                "colrev_status": colrev.record.RecordState.rev_included,
                "title": "What constitutes a theoretical contribution?",
                "journal": "Academy of Management Review",
                "author": "Whetten, D. A",
                "year": "1989",
                "volume": "14",
                "number": "4",
            },
            "NO_TITLE": {
                "ID": "NO_TITLE",
                "ENTRYTYPE": "article",
                "colrev_status": colrev.record.RecordState.rev_included,
                "journal": "Academy of Management Review",
                "author": "Whetten, D. A",
                "year": "1989",
                "volume": "14",
                "number": "4",
            },
            "NOT_INCLUDED": {
                "ID": "NOT_INCLUDED",
                "ENTRYTYPE": "article",
                "colrev_status": colrev.record.RecordState.rev_prescreen_excluded,
                "journal": "Academy of Management Review",
                "author": "Whetten, D. A",
                "year": "1989",
                "volume": "14",
                "number": "4",
            },
        }
    )
    actual = tei_doc.get_tei_str()
    expected = '<tei:biblStruct xml:id="b116" ID="TEST_ID">'
    assert expected in actual

    expected = 'theoretical rationale <tei:ref type="bibr" target="#b116" ID="TEST_ID">(Whetten, 1989)</tei:ref>, which is critical '
    assert expected in actual

    assert "NO_TITLE" not in actual

    assert "NOT_INCLUDED" not in actual
