title: How to @MockBean when there are 2 of the same type?
body: <p>Going to try to provide simplified example (hopefully I don't mess up somewhere)</p>
  <p>Let's say I have 2 @Beans of the same type, but one of them is annotated</p>
  <pre><code>@Configuration
  public class FooProvider {
  
    @Bean
    public Foo foo1() {...}
  
    @Bean
    @SpecialFoo
    public Foo foo2() {...}
  
  }
  
  @Qualifier
  @Retention(RetentionPolicy.RUNTIME)
  public @interface SpecialFoo {}
  </code></pre>
  <p>In my application, Spring seems to be ok with having one annotated bean and one un-annotated bean. The annotation is a @Qualifier</p>
  <pre><code>@Configuration
  public class BarProvider {
  
    @Bean
    public Bar bar1(Foo foo1) {...}
  
    @Bean
    public Bar bar2(@SpecialFoo Foo foo2) {...}
  }
  </code></pre>
  <p>All of that works. Program loads up and Spring doesn't complain.</p>
  <p>But the issue arises when I try to test it.</p>
  <pre><code>@ExtendWith(SpringExtension.class)
  @SpringBootTest(webEnvironment = WebEnvironment.MOCK)
  @AutoConfigureWebTestClient
  public class MyTest {
  
    @MockBean
    Foo foo1;
  
    @MockBean @SpecialFoo
    Foo foo2;
  
  }
  </code></pre>
  <p>At this point, I get an error like</p>
  <blockquote>
  <p>No qualifying bean of type 'Foo' available: expected single matching bean but found 2: foo1, foo2</p>
  </blockquote>
  <p>What am I doing wrong?</p>
  <p>Special request: I would prefer not to have to annotate <code>foo1</code> also or add a <code>@Qualifier</code> just because it's a lot of places I need to change. I'd rather the default bean be the un-annotated one.</p>