@Inherited @Target(value={METHOD,ANNOTATION_TYPE}) @Retention(value=RUNTIME) @ExtendWith(value=ExpectedExceptionExtension.class) public @interface ExpectedException
ExpectedExceptionExtension,
to indicate that a specific test is expected to fail in a particular way
(throw the specified exception) as its "success condition".ExpectedExceptionExtensionCopyright © 2001-2024 Red Hat, Inc. All Rights Reserved.