When using @MockBean and @SpyBean make it easier to inject any underlying proxy target as well as the mock or spy #22742
Labels
status: pending-design-work
Needs design work before any code can be developed
type: enhancement
A general enhancement
Milestone
We'd like to support something like this:
ProxiedBean
would then provide accessors for the bean both with and without all of its Spring proxies. This should make it easier to bypass any caching or advice when, for example, setting expectations, while having them in place when exercising the service. Hopefully this will address #22281 by providing a nicer API that can be used in place ofAopTestUtils.getTargetObject(service)
.The text was updated successfully, but these errors were encountered: