Test-driven development: JUnit

gradle:

maven:

Expected Exceptions Test

@RunWith BlockJUnit4ClassRunner – default junit runner SpringJUnit4ClassRunner allows you to use dependency injection in test classes or to create transactional test methods. MockitoJUnitRunner for automatic mock initialization. Suite Parameterized Parameters class

JUnit 5 – @ExtendWith

replace with

@Rule

or your custom rule: […]