### CI Link

https://elasticsearch-ci.elastic.co/job/elastic+elasticsearch+pull-request+example-plugins/930/console

### Repro line

cd plugin/examples; ./gradlew build --include-build ../..

### Does it reproduce?

Yes

### Applicable branches

master

### Failure history

_No response_

### Failure excerpt

The example projects fails with a compile error caused by this change here: https://github.com/elastic/elasticsearch/pull/86206

This is blocking current PR checks as example pr build is failing.

the stack trace:
> Task :security-authorization-engine:compileTestJava FAILED
09:14:22 /dev/shm/elastic+elasticsearch+pull-request+example-plugins/plugins/examples/security-authorization-engine/src/test/java/org/elasticsearch/example/CustomAuthorizationEngineTests.java:56: error: no suitable constructor found for Authentication(User,RealmRef,RealmRef)
09:14:22                 new Authentication(new User("joe", new String[]{"custom_superuser"}, new User("bar", "not_superuser")),
09:14:22                 ^
09:14:22     constructor Authentication.Authentication(User,RealmRef,RealmRef,Version,AuthenticationType,Map<String,Object>) is not applicable
09:14:22       (actual and formal argument lists differ in length)
09:14:22     constructor Authentication.Authentication(StreamInput) is not applicable
09:14:22       (actual and formal argument lists differ in length)
09:14:22 /dev/shm/elastic+elasticsearch+pull-request+example-plugins/plugins/examples/security-authorization-engine/src/test/java/org/elasticsearch/example/CustomAuthorizationEngineTests.java:73: error: no suitable constructor found for Authentication(User,RealmRef,RealmRef)
09:14:22                 new Authentication(new User("joe", new String[]{"not_superuser"}, new User("bar", "custom_superuser")),
09:14:22     
plugins/examples/security-authorization-engine/src/test/java/org/elasticsearch/example/CustomAuthorizationEngineTests.java
/*
 * Copyright Elasticsearch B.V. and/or licensed to Elasticsearch B.V. under one
 * or more contributor license agreements. Licensed under the Elastic License
 * 2.0 and the Server Side Public License, v 1; you may not use this file except
 * in compliance with, at your election, the Elastic License 2.0 or the Server
 * Side Public License, v 1.
 */
package org.elasticsearch.example;
import org.elasticsearch.Version;
import org.elasticsearch.action.search.SearchRequest;