Clean Unit Testing

It's easy to write "unit tests" that use JUnit and some mocking library.  They may produce code coverage that keep some stakeholders happy, even though the tests may not even be unit tests and the test may provide questionable value.  It can also be very easy to write unit tests that are (in theory) units test but are far more complex than the underlying code and hence just add to the total software entropy.

This particular type of software entropy has the unpleasant characteristic of making it even harder for the underlying software to be restructured or to surface new requirements. It is like the test has a negative value.

Testing Asynchronous Operations in Spring With Spock and Byteman

This is the second article that describes how to test asynchronous operations with the Byteman framework in an application using the Spring framework. The article discuss how to implement the Spock framework, while the first, "Testing Asynchronous Operations in Spring With JUnit and Byteman", focuses on implementing tests with JUnit4.

It's not necessary to read the previous article because all of the essentials are going to be repeated. Nevertheless, I encourage you to read that article if you are interested in testing asynchronous operations with JUnit.