### Question:
Ruta { @Deprecated public static AnalysisEngineDescription createAnalysisEngineDescription(String script) throws IOException, InvalidXMLException, ResourceInitializationException { return createAnalysisEngineDescription(script, (TypeSystemDescription[]) null); }  static void applyRule(JCas jcas, String rule, Object... configurationData); static void apply(CAS cas, String script, Map<String, Object> parameters); static void apply(CAS cas, String script); static void removeDebugInformation(JCas jcas); static String inject(String script, String placeholder, int[] addresses); static String inject(String script, FeatureStructureImpl... annotations); static List<Annotation> select(JCas jcas, String rule, Object... configurationData); static boolean matches(JCas jcas, String rule, Object... configurationData); static AnalysisEngine wrapAnalysisEngine(URL descriptorUrl, String viewName,
          ResourceManager resourceManager); static AnalysisEngine wrapAnalysisEngine(URL descriptorUrl, String viewName,
          boolean rutaEngine, String encoding, ResourceManager resourceManager); @Deprecated static AnalysisEngineDescription createAnalysisEngineDescription(String script); @Deprecated static AnalysisEngineDescription createAnalysisEngineDescription(String script,
          TypeSystemDescription... tsds);  }### Answer:
@Test public void testCreateAnalysisEngineDescription() throws Exception { TypeSystemDescription_impl tsdi = new TypeSystemDescription_impl(); String t1 = "some.type.Test1"; String t2 = "some.type.Test2"; TypeDescription_impl ti1 = new TypeDescription_impl(t1, "", "uima.tcas.Annotation"); TypeDescription_impl ti2 = new TypeDescription_impl(t2, "", "uima.tcas.Annotation"); tsdi.setTypes(new TypeDescription[] { ti1, ti2 }); String script = "CW SW{-> MARK(Test1)};\n Test1 SW{-> MARK(Test2)};"; @SuppressWarnings("deprecation") AnalysisEngineDescription aed = Ruta.createAnalysisEngineDescription(script, tsdi); AnalysisEngine ae = UIMAFramework.produceAnalysisEngine(aed); CAS cas = ae.newCAS(); cas.setDocumentText("Only some text."); ae.process(cas); Type type1 = cas.getTypeSystem().getType(t1); AnnotationIndex<AnnotationFS> ai1 = cas.getAnnotationIndex(type1); assertEquals(1, ai1.size()); assertEquals("some", ai1.iterator().get().getCoveredText()); Type type2 = cas.getTypeSystem().getType(t2); AnnotationIndex<AnnotationFS> ai2 = cas.getAnnotationIndex(type2); assertEquals(1, ai2.size()); assertEquals("text", ai2.iterator().get().getCoveredText()); }