Gil Zilberfeld talks about using an anti-pattern in Spring integration tests where flags are used in the tests for mocking and controlling simulators

Integration Testing with Spring: Configuration Logic in Integration Tests

Now that we’ve covered some of Spring capabilities, we can explore possibilities beyond simple mocking. Instead of “regular” mocks (that we can set up in the integration tests), we can inject actual simulators. For our purpose, let’s define a simulator… Continue Reading…

Gil Zilberfeld explains how to configure spring with mocks for integration tests

Integration Testing with Spring – Mocking

Let’s continue where we’ve left off – multiple configurations for integration tests. We use different configurations when we need to inject two different sets of objects. For example a real one and mocked one of the same type for different… Continue Reading…

Copyright Gil Zilberfeld, 2025