When having multiple beans defined with one marked with @Primary I'd expect that ApplicationContextAssert#getBean(Class<T>) to return the primary bean (like it is for application contexts). Instead it throws following error:
java.lang.AssertionError:
Expecting:
<Started application [AnnotationConfigWebApplicationContext@5c909414 id = 'org.springframework.web.context.support.AnnotationConfigWebApplicationContext@5c909414', applicationName = '', beanDefinitionCount = 76]>
single bean of type:
<de.codecentric.boot.admin.server.notify.Notifier>
but found:
<["testNotifierPrimary", "testNotifier2"]>