Package: groovy.junit6.plugin

## [Java] Class ExpectedToFailExtension

- groovy.junit6.plugin.ExpectedToFailExtension

- All Implemented Interfaces and Traits:
    InvocationInterceptor

      public class ExpectedToFailExtension
      extends Object
      implements InvocationInterceptor

  JUnit 5 InvocationInterceptor backing the ExpectedToFail annotation. Inverts a test's pass/fail outcome with optional exception-type and message-substring filters.

  Composes with ForkedJvm in either declaration order via explicit coordination through ExtensionContext.Store and a child-JVM system property — not via brittle reliance on annotation iteration order.

  Since:
    6.0.0

- - ### Field Summary

    Fields
    Modifiers | Name | Description
    --- | --- | ---
    `static String` | `DEFERRED_TO_PARENT_PROP` | System property set on the child JVM's command line by ForkedJvmExtension when the parent's `@ExpectedToFail` has claimed the inversion.

  - ### Methods Summary

    Methods
    Type Params | Return Type | Name and description
    --- | --- | ---
    `` | `public void` | `interceptTestMethod(Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)`

  - ### Inherited Methods Summary

    Inherited Methods
    Methods inherited from class | Name
    --- | ---
    `class Object` | `equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### public static final String DEFERRED_TO_PARENT_PROP

      System property set on the child JVM's command line by ForkedJvmExtension when the parent's `@ExpectedToFail` has claimed the inversion. The child's `@ExpectedToFail` interceptor checks this property and passes through honestly so the parent can observe the propagated outcome.

  - ### Method Detail

    - #### public void interceptTestMethod(Invocation<Void> invocation, ReflectiveInvocationContext<Method> invocationContext, ExtensionContext extensionContext)