title: No unique bean of type [org.springframework.batch.item.file.mapping.DefaultLineMapper] is defined: expected single matching bean but found 3
body: <p>I am having the following mapping for the one of the spring bean in my mapping-xml.Then when I am trying to @Autowired &quot;ClassParent&quot; in one of my junit-test class I am getting exception as &quot;org.springframework.beans.factory.NoSuchBeanDefinitionException: No unique bean of type [org.springframework.batch.item.file.mapping.DefaultLineMapper] is defined: expected single matching bean but found 3&quot;</p>
  <h1>The Mapping is :</h1>
  <pre><code>&lt;bean id=&quot;ClassParent&quot;
          class=&quot;org.springframework.batch.item.file.mapping.PatternMatchingCompositeLineMapper&quot;&gt;
          &lt;property name=&quot;tokenizers&quot;&gt;
              &lt;map&gt;
                  &lt;entry key=&quot;D*&quot; value-ref=&quot;ClassC&quot; /&gt;
                  &lt;entry key=&quot;T*&quot; value-ref=&quot;ClassD&quot; /&gt;
              &lt;/map&gt;
          &lt;/property&gt;
          &lt;property name=&quot;fieldSetMappers&quot;&gt;
              &lt;map&gt;
                  &lt;entry key=&quot;D*&quot; value-ref=&quot;ClassA&quot; /&gt;
                  &lt;entry key=&quot;T*&quot; value-ref=&quot;ClassB&quot; /&gt;
              &lt;/map&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  </code></pre>
  <p>How I can autowired the bean &quot;ClassParent&quot; please help me.</p>