def METHOD_NAME(
        config, app, users, create_deposit, create_schema, client, auth_headers_for_user):
    user = users['cms_user']
    create_schema('cms-stats-questionnaire', experiment='CMS', version="0.0.1", config=config)
    with app.app_context():
        with app.extensions['mail'].record_messages() as outbox:
            deposit = create_deposit(user, 'cms-analysis', TEST_DATA, experiment='CMS')
            resp = client.post(
                f"/deposits/{deposit['_deposit']['id']}/actions/publish",
                headers=auth_headers_for_user(user)
            )
            assert resp.status_code == 202
            assert len(outbox) == 1
            assert outbox[0].subject == 'New published document | CERN Analysis Preservation'