**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
case "ip" -> new BytesRef(InetAddressPoint.encode(randomIp(randomBoolean())));
            case "time_duration" -> Duration.ofMillis(randomNonNegativeLong());
            case "text" -> new BytesRef(randomAlphaOfLength(50));
            case "version" -> new Version(randomIdentifier()).toBytesRef();
            case "null" -> null;
            default -> throw new IllegalArgumentException("can't make random values for [" + type.typeName() + "]");
        }, type);
    }
    protected TestCase testCase;
    protected static Iterable<Object[]> parameterSuppliersFromTypedData(List<TestCaseSupplier> cases) {
        
        List<Object[]> parameters = new ArrayList<>(cases.size());
        for (TestCaseSupplier element : cases) {
            parameters.add(new Object[] { element });
        }
        return parameters;
    }
    protected static FieldAttribute field(String name, DataType type) {
        return new FieldAttribute(Source.EMPTY, name, new EsField(name, type, Map.of(), true));
    }
    /**
     * Build the expression being tested, for the given source and list of arguments.  Test classes need to implement this
     * to have something to test.
     * @param source the source
     * @param args arg list from the test case, should match the length expected
     * @return an expression for evaluating the function being tested on the given arguments
     */
    protected abstract Expression build(Source source, List<Expression> args);
    protected final Expression buildFieldExpression(TestCase testCase) {
        return build(testCase.getSource(), testCase.getDataAsFields());