Lets say you have a bunch of classes that call each other like this:
1 |
Root -> Middle -> End -> Database |
Here, Root calls Middle which calls End which calls Database . If you would like to test from Root , and want to mock out the Database how can you do that in Spring? Spring doesn’t make this easy. But I have figured out how to do this in a way that I consider satisfactory.