anchor.diff:  [[writing-tests]]
   == Writing Tests
  +
  +The following example provides a glimpse at the minimum requirements for writing a test in
  +JUnit Jupiter. Subsequent sections of this chapter will provide further details on all
  +available features.
   
   [source,java,indent=0]
   .A first test case
  
positive.code: | `@TempDir`               | Used to supply a <<writing-tests-built-in-extensions-TempDirectory,temporary directory>> via field injection or parameter injection in a lifecycle method or test method; located in the `org.junit.jupiter.api.io` package.
  |===
  
  Any method annotated with `@Test`, `@TestTemplate`, `@RepeatedTest`, `@ParameterizedTest`,
  `@BeforeAll`, `@AfterAll`, `@BeforeEach`, or `@AfterEach` must not return a value.
  
  WARNING: Some annotations may currently be _experimental_. Consult the table in
  <<api-evolution-experimental-apis>> for details.
  
  
negative.code: [[writing-tests-nested]]
  === Nested Tests
  
  `@Nested` tests give the test writer more capabilities to express the relationship among
  several groups of tests. Here's an elaborate example.
  
  [source,java,indent=0]
  .Nested test suite for testing a stack
  