source: class TikaConfigTest  {
  
      @Test
      public void parserWithChildParsers() throws Exception {
  
target:         try {
              TikaConfig config = getConfig("TIKA-1653-norepeat.xml");
              
              CompositeParser cp = (CompositeParser)config.getParser();
              List<Parser> parsers = cp.getAllComponentParsers();
              Parser p;
              
              // Just 2 top level parsers
              assertEquals(2, parsers.size());
              
              // Should have a CompositeParser with 2 child ones, and
              //  and a wrapped empty parser
              p = parsers.get(0);
              assertTrue(p.toString(), p instanceof CompositeParser);
              assertEquals(2, ((CompositeParser)p).getAllComponentParsers().size());
              
              p = parsers.get(1);
              assertTrue(p.toString(), p instanceof ParserDecorator);
              assertEquals(EmptyParser.class, ((ParserDecorator)p).getWrappedParser().getClass());
              assertEquals("hello/world", p.getSupportedTypes(null).iterator().next().toString());
          } catch (TikaException e) {
              fail("Unexpected TikaException: " + e);
          }
      }
  
  }