Adjust tests to fit contribution guidelines

Contribution guidelines:
https://github.com/spring-projects/spring-framework/blob/master/CONTRIBUTING.md

Issue: SPR-12198