Refactoring tests for clarity, especially in Spring config