ProxyProcessorSupport.isInternalLanguageInterface recognises Mockito's MockAccess interface by checking whether its name ends with .bytebuddy.MockAccess, so that evaluateProxyInterfaces doesn't treat it as a proxy interface.
Since Mockito 5.16.1 (mockito/mockito#3608), this interface has moved to org.mockito.internal.creation.bytebuddy.access.MockAccess, so the check no longer matches. As a result, an auto-proxied mock created with the subclass mock maker (with proxyTargetClass=false) gets a JDK proxy that only implements MockAccess instead of a CGLIB proxy, so the bean is no longer of its own class.
Could .bytebuddy.access.MockAccess be added to the check in ProxyProcessorSupport as well?
ProxyProcessorSupport.isInternalLanguageInterfacerecognises Mockito'sMockAccessinterface by checking whether its name ends with.bytebuddy.MockAccess, so thatevaluateProxyInterfacesdoesn't treat it as a proxy interface.Since Mockito 5.16.1 (mockito/mockito#3608), this interface has moved to
org.mockito.internal.creation.bytebuddy.access.MockAccess, so the check no longer matches. As a result, an auto-proxied mock created with the subclass mock maker (withproxyTargetClass=false) gets a JDK proxy that only implementsMockAccessinstead of a CGLIB proxy, so the bean is no longer of its own class.Could
.bytebuddy.access.MockAccessbe added to the check inProxyProcessorSupportas well?