@TestBean
currently supports name
and value
aliases; however, @MockitoBean
and @MockitoSpyBean
only support a name
attribute which requires users to type @MockitoBean(name = "userService")
instead of simply @MockitoBean("userService")
.
To improve the user experience for common cases, we should introduce new value
attributes in @MockitoBean
and @MockitoSpyBean
as aliases for the existing name
attributes.