UIMA-6271: Ruta: option to validate internal indexing in RutaEngine

- go back to released uimafit version and replace managedJCas fro now in test
diff --git a/ruta-core/pom.xml b/ruta-core/pom.xml
index cc4e9b9..5356837 100644
--- a/ruta-core/pom.xml
+++ b/ruta-core/pom.xml
@@ -151,23 +151,23 @@
       <scope>test</scope>

     </dependency>

     

-    <dependency>

-      <groupId>org.apache.uima</groupId>

-      <artifactId>uimafit-junit</artifactId>

-      <version>${uimafit-version}</version>

-      <scope>test</scope>

-      <!-- Exclude aop stuff, which is not need by uimafit and only introduces a non-asl license -->

-      <exclusions>

-        <exclusion>

-          <groupId>org.springframework</groupId>

-          <artifactId>spring-aop</artifactId>

-        </exclusion>

-        <exclusion>

-          <groupId>aopalliance</groupId>

-          <artifactId>aopalliance</artifactId>

-        </exclusion>

-      </exclusions>

-    </dependency>

+<!--     <dependency> -->

+<!--       <groupId>org.apache.uima</groupId> -->

+<!--       <artifactId>uimafit-junit</artifactId> -->

+<!--       <version>${uimafit-version}</version> -->

+<!--       <scope>test</scope> -->

+<!--       Exclude aop stuff, which is not need by uimafit and only introduces a non-asl license -->

+<!--       <exclusions> -->

+<!--         <exclusion> -->

+<!--           <groupId>org.springframework</groupId> -->

+<!--           <artifactId>spring-aop</artifactId> -->

+<!--         </exclusion> -->

+<!--         <exclusion> -->

+<!--           <groupId>aopalliance</groupId> -->

+<!--           <artifactId>aopalliance</artifactId> -->

+<!--         </exclusion> -->

+<!--       </exclusions> -->

+<!--     </dependency> -->

 

     <dependency>

       <groupId>org.slf4j</groupId>

diff --git a/ruta-core/src/test/java/org/apache/uima/ruta/RutaBasicUtilsTest.java b/ruta-core/src/test/java/org/apache/uima/ruta/RutaBasicUtilsTest.java
index 89e11e2..bf55a78 100644
--- a/ruta-core/src/test/java/org/apache/uima/ruta/RutaBasicUtilsTest.java
+++ b/ruta-core/src/test/java/org/apache/uima/ruta/RutaBasicUtilsTest.java
@@ -22,17 +22,35 @@
 
 import org.apache.uima.analysis_engine.AnalysisEngineProcessException;
 import org.apache.uima.cas.CAS;
-import org.apache.uima.fit.testing.junit.ManagedJCas;
+import org.apache.uima.fit.factory.JCasFactory;
 import org.apache.uima.jcas.JCas;
 import org.apache.uima.ruta.engine.Ruta;
 import org.apache.uima.ruta.type.CW;
 import org.apache.uima.ruta.type.RutaBasic;
-import org.junit.Rule;
+import org.junit.Before;
 import org.junit.Test;
 
 public class RutaBasicUtilsTest {
 
-  public @Rule ManagedJCas managedJCas = new ManagedJCas();
+  // TODO use uimafit when released instead
+  // public @Rule ManagedJCas managedJCas = new ManagedJCas();
+
+  private static ThreadLocal<JCas> managedJCas = new ThreadLocal<>();
+
+  static {
+
+    try {
+      JCas jCas = JCasFactory.createJCas();
+      managedJCas.set(jCas);
+    } catch (Exception e) {
+      throw new IllegalStateException(e);
+    }
+  }
+
+  @Before
+  public void setup() {
+    managedJCas.get().reset();
+  }
 
   @Test(expected = AnalysisEngineProcessException.class)
   public void testBreakOnNoBasics() throws AnalysisEngineProcessException {
diff --git a/ruta-parent/pom.xml b/ruta-parent/pom.xml
index 5f70f13..5492b12 100644
--- a/ruta-parent/pom.xml
+++ b/ruta-parent/pom.xml
@@ -131,7 +131,7 @@
       Creative Commons Attribution 3.0 License.

     </postNoticeText>

     <uimaVersion>2.10.4</uimaVersion>

-    <uimafit-version>2.5.1-SNAPSHOT</uimafit-version>

+    <uimafit-version>2.5.0</uimafit-version>

     <spring-version>4.3.22.RELEASE</spring-version>

     <!--

       BACKWARD_COMPATIBLE_IMPLEMENTER - patch version (=.=.+)