### Question:
PipelineScriptParser { @SuppressWarnings("unchecked") static void parseAE(String line, IteratorWithPrevious<String> it, Pipeline pipeline) throws ParseException { LOG.info("+-parsing line '{}'", line); String aeName = line.replaceFirst("ae: ", "").trim(); if (aeName.endsWith(".xml")) { File aeXml = new File(aeName.replaceAll("\\$ROOT", BlueUima.BLUE_UIMA_ROOT)); if (!aeXml.exists()) throw new ParseException("no xml descriptor found at " + aeXml.getAbsolutePath(), -1); Pair<List<Object>, String> params = parseParams(it); try { pipeline.addAe(createEngineDescriptionFromPath( aeXml.getAbsolutePath(), params.getKey().toArray())); } catch (Exception e) { throw new ParseException( "could not instantiate CollectionReader, error: " + e.getMessage(), -1); } } else { if (aeName.endsWith(".class")) aeName = aeName.substring(0, aeName.length() - 6); Class<? extends AnalysisComponent> classz = null; String[] prefixes = { "", "ch.epfl.bbp.uima.ae.", "ch.epfl.bbp.uima.ae.output.", "ch.epfl.bbp.uima.ae.cleanup." }; String tried = ""; for (String prefix : prefixes) { try { tried += prefix + aeName + " "; classz = (Class<? extends AnalysisComponent>) Class .forName(prefix + aeName); break; } catch (Exception e1) { } } if (classz == null) throw new ParseException("no class found on classpath: " + aeName + ", tried: " + tried, -1); Pair<List<Object>, String> params = parseParams(it); validateParams(params.getKey(), classz); try { AnalysisEngineDescription aed = AnalysisEngineFactory .createEngineDescription(classz, params.getKey() .toArray()); pipeline.addAe(aed); } catch (ResourceInitializationException e) { throw new ParseException( "could not instantiate CollectionReader, error: " + e.getMessage(), -1); } } }  static Pipeline parse(File scriptFile); static Pipeline parse(File scriptFile, List<String> replacementVars); static Pipeline parse(List<String> scriptLines,
            String parentFilePath, List<String> replacementVars);  }### Answer:
@Test public void testParseAe() throws Exception { Pipeline p = new Pipeline(); PipelineScriptParser.parseAE("ae: " + WhitespaceTokenizerAnnotator.class.getName(), EMPTY_ARGS, p); }
@Test public void testParseAe2() throws Exception { PipelineScriptParser.parseAE("ae: " + WhitespaceTokenizerAnnotator.class.getSimpleName(), EMPTY_ARGS, new Pipeline()); }
@Test public void testParseAe_fromCleanup() throws Exception { PipelineScriptParser.parseAE("ae: " + BartWriter.class.getName(), EMPTY_ARGS, new Pipeline()); }
@Test public void testParseAe_fromCleanup_simpleName() throws Exception { PipelineScriptParser.parseAE("ae: " + BartWriter.class.getSimpleName(), EMPTY_ARGS, new Pipeline()); }