title: How can I override a CDI bean in Quarkus for testing?
body: <p>I have a CDI bean like so:</p>
  
  <pre class="lang-java prettyprint-override"><code>@Dependent
  class Parser {
  
    String[] parse(String expression) {
       return expression.split("::");
    }
  }
  </code></pre>
  
  <p>It gets injected into another bean like this:</p>
  
  <pre class="lang-java prettyprint-override"><code>@ApplicationScoped
  class ParserService {
  
    @Inject
    Parser parser;
  
    //...
  }
  </code></pre>
  
  <p>What I want to do is continue to use <code>Parser</code> in my regular code, but I want to use a "mock" for testing purposes. How can I achieve that?</p>