def METHOD_NAME(mocker, app):
    with app.test_request_context(headers={'Cookie': 'idToken=access-token'}):
        mock_abort = mocker.patch('api.PclusterApiHandler.abort')
        authenticate({'any-group'})
        mock_abort.assert_called_once_with(401)