def METHOD_NAME():
    """
    Test the basic behaviour of the XPathBuilder class.
    """
    from masci_tools.util.xml.xpathbuilder import XPathBuilder
    simple_xpath = '/test/xpath/simple'
    xpath = XPathBuilder(simple_xpath)
    assert xpath.path == simple_xpath
    xpath.add_filter('xpath', {'index': -2})
    with pytest.raises(ValueError):
        xpath.add_filter('not-existing', {'index': -3})
    assert xpath.path == '/test/xpath[last() - $xpath_index]/simple'
    assert str(xpath) == '/test/xpath[last() - 1]/simple'
    assert xpath.path_variables == {'xpath_index': 1}
    xpath = XPathBuilder(simple_xpath, strict=True)
    with pytest.raises(ValueError):
        str(xpath)
    xpath = XPathBuilder(etree.XPath(simple_xpath), compile_path=True, smart_strings=True)
    xpath.add_filter('xpath', {'index': -2})
    assert isinstance(xpath.path, etree.XPath)
    assert str(xpath) == '/test/xpath[last() - 1]/simple'
    with pytest.raises(ValueError):
        xpath = XPathBuilder(etree.XPath(simple_xpath), smart_strings=True)