def METHOD_NAME():
    """
    Verify that the FileTransportAdapter works as expected for error
    scenarios:
     - requested resource is a directory
     - requested resource not found
     - request method is not 'GET'
    """
    requests_session = session()
    requests_session.mount("file://", FileTransportAdapter())
    # utilize the test source code as resource
    this_file_p = Path(__file__)
    # requested resource is a directory
    url = this_file_p.parent.as_uri()
    res = requests_session.get(url)
    assert res.status_code == 400, url
    assert res.reason == "Not a file"
    assert len(res.text) == 0
    # requested resource wasn't found
    url = this_file_p.resolve().with_name("no-such-file").as_uri()
    res = requests_session.get(url)
    assert res.status_code == 404, url
    assert res.reason == "File not found"
    assert len(res.text) == 0
    # request method is not supported
    url = this_file_p.as_uri()
    unsupported_methods = [
        requests_session.delete,
        requests_session.head,
        requests_session.options,
        requests_session.patch,
        requests_session.post,
        requests_session.put,
    ]
    for unsupported_method in unsupported_methods:
        res = unsupported_method(url)
        assert res.status_code == 405, url
        assert res.reason == "Method not allowed"