Starting with version 3.4.0 Mockito now supports mocking static methods. This video demonstrates how to make use of this feature to mock the usage of Java's UUID and LocalDateTime classes.
In addition, you'll learn how to refactor the implementation to avoid mocking static methods.
The source code for this example is available on GitHub: https://github.com/rieckpil/blog-tuto...
More testing related content is available here: https://rieckpil.de/category/testing/
» Want to become an expert for testing Spring Boot applications? Join the Testing Spring Boot Applications Masterclass: https://rieckpil.de/testing-spring-bo...
» Join the 14 Days Free Email Course on Testing Java Applications to Accelerate Your Testing Success: https://rieckpil.de/getting-started-w...