Overview
I think ControllerAdviceBean#resolveBean() should be tested, because it is a public API and depends on the cache system, so I'd like to add tests for that.
Related Issues
-
32776
Comment From: tafjwr
Plus, I noticed that the some test method pairs perform precisely the same tests (xxxForBeanName and xxxForBeanInstance). There is no longer a ControllerAdviceBean constructor that accepts a bean instance, so xxxForBeanInstance test methods could be omitted.
https://github.com/spring-projects/spring-framework/blob/328b72133f39a1027f8796007336c9d2aca73abe/spring-web/src/test/java/org/springframework/web/method/ControllerAdviceBeanTests.java#L98-L106
Comment From: sbrannen
Plus, I noticed that the some test method pairs perform precisely the same tests (
xxxForBeanNameandxxxForBeanInstance). There is no longer aControllerAdviceBeanconstructor that accepts a bean instance, soxxxForBeanInstancetest methods could be omitted.
Good catch.
Please remove the obsolete "bean instance" tests.
Comment From: tafjwr
Thank for your advice! I removed the obsolete tests on 8d045ad
Comment From: sbrannen
This has been merged into main in 4ffeddb099f8fcc9eb6b89a98c57d60246ab6ca2 and revised in 346b6f740a98f81e0f55aa641a9bb39fec51580a.
Thanks