Rather than having to override the getBeanName method when there is one, this commit moves it as a @Nullable argument. This makes sure that equals and hashCode consistently use the bean name. getBeanName cannot be final just yet as the test infrastructure overrides it. Also, arguments are now ordered consistently, which improves code readability and type signature.