Powermock Junit 5. See the code example, the pom. Spring Boot PowerMock JUnit