Learn how to create true Java unit tests by mocking all external dependencies in your unit tests with the Spock testing framework.
Kostis Kapelonis

Stubbing and Mocking with Mockito and JUnit
Mocking and stubbing are the cornerstones of having quick and simple unit tests. Mocks are useful if you have a dependency on an external system, file reading takes too long, the database connection is unreliable, or if you don’t want to send an email after every test. Unlike with integration or functional tests, where the […]
Testing REST Endpoints Using REST Assured
Introduction Having a large collection of unit tests that verify the behaviour of Java classes is only the first step to a sound testing strategy. After all, the fact that individual Java classes work successfully in isolation does not mean that the application itself will also work correctly ,when all these classes are bundled together. […]
How to Split JUnit Tests in a Continuous Integration Environment
Introduction Continuous Integration/Delivery has gained widespread acceptance in the minds of developers, and has become an important aspect of the quick release cycles in the software industry. However, adopting continuous integration is not going to bring any benefits, if we don’t make sure that our build system can run in a CI environment with multiple […]