title: Where is documentation for Gradle's `test` block from Java plugin located?
body: <p>As can be seen from the top of <a href="https://docs.gradle.org/7.2/javadoc/org/gradle/api/tasks/testing/Test.html" rel="nofollow noreferrer">documentation of class <code>org.gradle.api.tasks.testing.Test</code></a>, test tasks can be configured using the following piece of code:</p>
  <pre><code>test {
      // configuration here. For example:
      useJUnitPlatform()
  }
  </code></pre>
  <p>From usage of <a href="https://docs.gradle.org/7.2/javadoc/org/gradle/api/tasks/testing/Test.html#useJUnitPlatform--" rel="nofollow noreferrer">method <code>useJUnitPlatform</code></a> we can assume that method <code>test</code> is called with a <code>Closure</code> which has an instance of aforementioned class <code>Test</code> as delegate.</p>
  <p>In Gradle, there are other similar methods which take a <code>Closure</code>. For example, <code>afterEvaluate</code>. <a href="https://docs.gradle.org/7.2/javadoc/org/gradle/api/Project.html#afterEvaluate-groovy.lang.Closure-" rel="nofollow noreferrer">Documentation of method <code>afterEvaluate</code></a> is readily available in documentation of class <code>Project</code>. This is also <a href="https://docs.gradle.org/7.2/userguide/build_lifecycle.html#sec:project_evaluation" rel="nofollow noreferrer">mentioned in the user guide</a>:</p>
  <blockquote>
  <p>This example uses method <code>Project.afterEvaluate()</code> to add a closure which is executed after the project is evaluated.</p>
  </blockquote>
  <p>Where is the documentation of method <code>test</code>? I could not find it. Or maybe this isn't a method in a class, but inserted via reflection into class <code>Project</code> at runtime or some similar DSL magic?</p>