Have you ever wondering how to make your application travel in time? If you have, let me tell you that’s great because in the following tutorial I’m going to show you in the real examples how to manage time for all of three test layers - unit tests, integration tests and end-to-end testing.
Let's build a coffee machine and then find out what happened if you inject a smaller scope bean into a larger scope bean. Spoiler: In the last part I'll tell you how to fix the coffee machine.
From the following guide you will learn how to configure maven project to work with Spock Testing Framework in both cases: standard Java maven project and SpringBoot maven project.
There are situations in witch you need to access Spring ApplicationContext or any other Spring bean from a static method. At the beginning I would like to emphasise, that wiring a…