The @TestInstance annotation in JUnit 5 controls the lifecycle of test instances. It determines whether a new test class instance is created for each test method or if a single instance is shared across all test methods.
This annotation accepts one of two values from the TestInstance.Lifecycle enum:
PER_METHOD (default) - New instance for each test method
PER_CLASS - Single instance shared across all test methods