Testing Multithreaded Code
Explore how to test challenging multithreaded Java code by redesigning for testability and breaking dependencies with stubs and mocks. Understand concurrency utilities and write both application-focused and thread-focused tests to ensure reliable concurrent execution.
Not everything is easy in unit testing. Some code will be downright tricky to test. We’ll work through a couple of examples of how to test some of the more challenging situations. Specifically, we’ll write tests for code that involves threading and ...