def METHOD_NAME(self, app):
    expected_req = [
        (
            {
                "path": "/arcgis/rest/services/NonExistentLayer/ImageServer/exportImage?f=image&format=png&imageSR=900913&bboxSR=900913&bbox=-20037508.342789244,-20037508.342789244,20037508.342789244,20037508.342789244&size=512,512"
            },
            {"body": b"", "status": 400},
        )
    ]
    with mock_httpd(
        ("localhost", 42423), expected_req, bbox_aware_query_comparator=True
    ):
        resp = app.get("/tms/1.0.0/app2_wrong_url_layer/0/0/1.png", status=500)
        assert resp.status_code == 500