This commit also ensures that @Bean methods are declared within @Configuration classes instead of within test classes. See gh-29122
This commit also ensures that @Bean methods are declared within @Configuration classes instead of within test classes. See gh-29122