The JUnit lifecycle specifies when setup code runs: @BeforeEach and @AfterEach before and after each test, @BeforeAll and @AfterAll only once (static methods by default). JUnit creates a new instance of the test class for each test.
Example
@BeforeEach
void init() { compte = new Compte(100); }