### Question:
MvcConfig implements WebMvcConfigurer { @Bean public SpringResourceTemplateResolver templateResolver() { SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver(); templateResolver.setPrefix("classpath:/templates/"); templateResolver.setSuffix(".html"); templateResolver.setTemplateMode(TemplateMode.HTML); templateResolver.setCharacterEncoding(StandardCharsets.UTF_8.name()); templateResolver.setCacheable(false); return templateResolver; }  @Bean SpringResourceTemplateResolver templateResolver(); @Bean SpringTemplateEngine templateEngine(SpringResourceTemplateResolver templateResolver); @Bean ThymeleafViewResolver viewResolver(SpringTemplateEngine templateEngine); @Override void addResourceHandlers(ResourceHandlerRegistry registry); @Bean MessageSource messageSource();  }### Answer:
@Test @DisplayName("templateResolverのBeanが定義されている") public void templateResolverTest() { Method templateResolverMethod = assertDoesNotThrow(() -> MvcConfig.class.getMethod("templateResolver")); Bean bean = templateResolverMethod.getAnnotation(Bean.class); assertNotNull(bean); SpringResourceTemplateResolver templateResolver = mvcConfig.templateResolver(); assertAll("templateResolver not configured correctly", () -> assertEquals("classpath:/templates/", templateResolver.getPrefix()), () -> assertEquals(".html", templateResolver.getSuffix()), () -> assertEquals(TemplateMode.HTML, templateResolver.getTemplateMode()), () -> assertEquals(StandardCharsets.UTF_8.name(), templateResolver.getCharacterEncoding()), () -> assertEquals(false, templateResolver.isCacheable()) ); }