**Build scan:**
https://gradle-enterprise.elastic.co/s/xqolvygzjbggs/tests/:x-pack:plugin:esql:test/org.elasticsearch.xpack.esql.tree.EsqlNodeSubclassTests

**Reproduction line:**
```
null
```

**Applicable branches:**
main

**Reproduces locally?:**
Didn't try

**Failure history:**
https://gradle-enterprise.elastic.co/scans/tests?tests.container=org.elasticsearch.xpack.esql.tree.EsqlNodeSubclassTests&tests.test=initializationError

**Failure excerpt:**
```
java.lang.ExceptionInInitializerError: (No message provided)

  at java.lang.Class.forName0(Class.java:-2)
  at java.lang.Class.forName(Class.java:391)
  at java.lang.Class.forName(Class.java:382)
  at org.elasticsearch.xpack.ql.tree.NodeSubclassTests.maybeLoadClass(NodeSubclassTests.java:721)
  at org.elasticsearch.xpack.ql.tree.NodeSubclassTests$2.visitFile(NodeSubclassTests.java:689)
  at org.elasticsearch.xpack.ql.tree.NodeSubclassTests$2.visitFile(NodeSubclassTests.java:680)
  at java.nio.file.Files.walkFileTree(Files.java:2781)
  at java.nio.file.Files.walkFileTree(Files.java:2852)
  at org.elasticsearch.xpack.ql.tree.NodeSubclassTests.subclassesOf(NodeSubclassTests.java:680)
  at org.elasticsearch.xpack.esql.tree.EsqlNodeSubclassTests.nodeSubclasses(EsqlNodeSubclassTests.java:140)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:578)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.collectMethodExecutions(RandomizedRunner.java:1501)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.collectTestCandidates(RandomizedRunner.java:1326)
  at com.carrotsearch.randomizedtesting.RandomizedRunner.<init>(RandomizedRunner.java:386)
  at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
  at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
  at java.lang.reflect.Constructor.newInstance(Constructor.java:484)
  at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
  at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
  at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
  at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
  at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
  at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
  at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:77)
  at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
  at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
  at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:60)
  at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:52)
  at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
  at java.lang.reflect.Method.invoke(Method.java:578)
  at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
  at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
  at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
  at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
  at jdk.proxy1.$Proxy2.processTestClass(null:-1)
  at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
  at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
  at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
  at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
  at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
  at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
  at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
  at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
  at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

  Caused by: java.lang.RuntimeException: java.io.IOException: Problem reading font data.

    at org.elasticsearch.xpack.esql.expression.function.RailRoadDiagram.loadFont(RailRoadDiagram.java:157)
    at org.elasticsearch.xpack.esql.expression.function.RailRoadDiagram.<clinit>(RailRoadDiagram.java:43)
    at java.lang.Class.forName0(Class.java:-2)
    at java.lang.Class.forName(Class.java:391)
    at java.lang.Class.forName(Class.java:382)
    at org.elasticsearch.xpack.ql.tree.NodeSubclassTests.maybeLoadClass(NodeSubclassTests.java:721)
    at org.elasticsearch.xpack.ql.tree.NodeSubclassTests$2.visitFile(NodeSubclassTests.java:689)
    at org.elasticsearch.xpack.ql.tree.NodeSubclassTests$2.visitFile(NodeSubclassTests.java:680)
    at java.nio.file.Files.walkFileTree(Files.java:2781)
    at java.nio.file.Files.walkFileTree(Files.java:2852)
    at org.elasticsearch.xpack.ql.tree.NodeSubclassTests.subclassesOf(NodeSubclassTests.java:680)
    at org.elasticsearch.xpack.esql.tree.EsqlNodeSubclassTests.nodeSubclasses(EsqlNodeSubclassTests.java:140)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke(Method.java:578)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.collectMethodExecutions(RandomizedRunner.java:1501)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.collectTestCandidates(RandomizedRunner.java:1326)
    at com.carrotsearch.randomizedtesting.RandomizedRunner.<init>(RandomizedRunner.java:386)
    at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
    at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    at java.lang.reflect.Constructor.newInstance(Constructor.java:484)
    at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
    at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
    at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
    at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
    at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:77)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
    at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
    at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:60)
    at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:52)
    at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    at java.lang.reflect.Method.invoke(Method.java:578)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
    at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
    at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
    at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
    at jdk.proxy1.$Proxy2.processTestClass(null:-1)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
    at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
    at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
    at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
    at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
    at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
    at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

    Caused by: java.io.IOException: Problem reading font data.

      at java.awt.Font.createFont0(Font.java:1205)
      at java.awt.Font.createFont(Font.java:1076)
      at org.elasticsearch.xpack.esql.expression.function.RailRoadDiagram.loadFont(RailRoadDiagram.java:153)
      at org.elasticsearch.xpack.esql.expression.function.RailRoadDiagram.<clinit>(RailRoadDiagram.java:43)
      at java.lang.Class.forName0(Class.java:-2)
      at java.lang.Class.forName(Class.java:391)
      at java.lang.Class.forName(Class.java:382)
      at org.elasticsearch.xpack.ql.tree.NodeSubclassTests.maybeLoadClass(NodeSubclassTests.java:721)
      at org.elasticsearch.xpack.ql.tree.NodeSubclassTests$2.visitFile(NodeSubclassTests.java:689)
      at org.elasticsearch.xpack.ql.tree.NodeSubclassTests$2.visitFile(NodeSubclassTests.java:680)
      at java.nio.file.Files.walkFileTree(Files.java:2781)
      at java.nio.file.Files.walkFileTree(Files.java:2852)
      at org.elasticsearch.xpack.ql.tree.NodeSubclassTests.subclassesOf(NodeSubclassTests.java:680)
      at org.elasticsearch.xpack.esql.tree.EsqlNodeSubclassTests.nodeSubclasses(EsqlNodeSubclassTests.java:140)
      at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.lang.reflect.Method.invoke(Method.java:578)
      at com.carrotsearch.randomizedtesting.RandomizedRunner.collectMethodExecutions(RandomizedRunner.java:1501)
      at com.carrotsearch.randomizedtesting.RandomizedRunner.collectTestCandidates(RandomizedRunner.java:1326)
      at com.carrotsearch.randomizedtesting.RandomizedRunner.<init>(RandomizedRunner.java:386)
      at jdk.internal.reflect.DirectConstructorHandleAccessor.newInstance(DirectConstructorHandleAccessor.java:67)
      at java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
      at java.lang.reflect.Constructor.newInstance(Constructor.java:484)
      at org.junit.internal.builders.AnnotatedBuilder.buildRunner(AnnotatedBuilder.java:104)
      at org.junit.internal.builders.AnnotatedBuilder.runnerForClass(AnnotatedBuilder.java:86)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      at org.junit.internal.builders.AllDefaultPossibilitiesBuilder.runnerForClass(AllDefaultPossibilitiesBuilder.java:26)
      at org.junit.runners.model.RunnerBuilder.safeRunnerForClass(RunnerBuilder.java:59)
      at org.junit.internal.requests.ClassRequest.getRunner(ClassRequest.java:33)
      at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.runTestClass(JUnitTestClassExecutor.java:77)
      at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:58)
      at org.gradle.api.internal.tasks.testing.junit.JUnitTestClassExecutor.execute(JUnitTestClassExecutor.java:40)
      at org.gradle.api.internal.tasks.testing.junit.AbstractJUnitTestClassProcessor.processTestClass(AbstractJUnitTestClassProcessor.java:60)
      at org.gradle.api.internal.tasks.testing.SuiteTestClassProcessor.processTestClass(SuiteTestClassProcessor.java:52)
      at jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
      at java.lang.reflect.Method.invoke(Method.java:578)
      at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:36)
      at org.gradle.internal.dispatch.ReflectionDispatch.dispatch(ReflectionDispatch.java:24)
      at org.gradle.internal.dispatch.ContextClassLoaderDispatch.dispatch(ContextClassLoaderDispatch.java:33)
      at org.gradle.internal.dispatch.ProxyDispatchAdapter$DispatchingInvocationHandler.invoke(ProxyDispatchAdapter.java:94)
      at jdk.proxy1.$Proxy2.processTestClass(null:-1)
      at org.gradle.api.internal.tasks.testing.worker.TestWorker$2.run(TestWorker.java:176)
      at org.gradle.api.internal.tasks.testing.worker.TestWorker.executeAndMaintainThreadName(TestWorker.java:129)
      at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:100)
      at org.gradle.api.internal.tasks.testing.worker.TestWorker.execute(TestWorker.java:60)
      at org.gradle.process.internal.worker.child.ActionExecutionWorker.execute(ActionExecutionWorker.java:56)
      at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:113)
      at org.gradle.process.internal.worker.child.SystemApplicationClassLoaderWorker.call(SystemApplicationClassLoaderWorker.java:65)
      at worker.org.gradle.process.internal.worker.GradleWorkerMain.run(GradleWorkerMain.java:69)
      at worker.org.gradle.process.internal.worker.GradleWorkerMain.main(GradleWorkerMain.java:74)

```
x-pack/plugin/esql/src/test/java/org/elasticsearch/xpack/esql/expression/function/AbstractFunctionTestCase.java
/*
         * For each original test case, add as many copies as there were
         * arguments, replacing one of the arguments with null and keeping
         * the others.
         *
         * Also, if this was the first time we saw the signature we copy it
         * *again*, replacing the argument with null, but annotating the
         * argument's type as `null` explicitly.
         */
        Set<List<DataType>> uniqueSignatures = new HashSet<>();
        for (TestCaseSupplier original : testCaseSuppliers) {
            boolean firstTimeSeenSignature = uniqueSignatures.add(original.types);
            for (int nullPosition = 0; nullPosition < original.types.size(); nullPosition++) {
                int finalNullPosition = nullPosition;
                suppliers.add(new TestCaseSupplier(original.name + " null in " + nullPosition, original.types, () -> {
                    TestCase oc = original.get();
                    List<TypedData> data = IntStream.range(0, oc.data.size()).mapToObj(i -> {
                        TypedData od = oc.data.get(i);
                        if (i == finalNullPosition) {
                            return new TypedData(null, od.type, od.name);
                        }
                        return od;
                    }).toList();
                    return new TestCase(
                        data,
                        oc.evaluatorToString,
                        oc.expectedType,
                        nullValue(),
                        oc.expectedWarnings,
                        oc.expectedTypeError