As discovered by #31407, we can't reliably test messages from the compiler as they are rendered by the default locale at the moment. We should offer a way to set that to a specific one.

Comment From: snicoll

FTR this enhancement was reverted in https://github.com/spring-projects/spring-framework/issues/31536