package com.jivesoftware.os.miru.plugin.query;

import com.google.common.collect.Lists;
import org.apache.lucene.analysis.Analyzer;
import org.testng.annotations.Test;

import java.util.List;

import static org.testng.Assert.*;

public class TermAnalyzersTest {
    @Test
    public void testFindAnalyzer() throws Exception {
        TermAnalyzers termAnalyzers = new TermAnalyzers();
        List<String> localeList = Lists.newArrayList("en", "zh_cn", "foo_bar_bazz");
        for (String locale : localeList) {
            Analyzer analyzer = termAnalyzers.findAnalyzer(locale, false);
            assertEquals("6.2.1", analyzer.getVersion().toString());
            System.out.println(locale + " v" + analyzer.getVersion());
        }
    }

}

@@ -166,32 +166,8 @@
 t;%0A%0A
-import java.util.List;%0A%0A
 impo
@@ -198,9 +198,20 @@
 ert.
-*
+assertEquals
 ;%0A%0Ap
@@ -242,16 +242,17 @@
 sTest %7B%0A
+%0A
     @Tes
@@ -378,33 +378,28 @@
     
-List%3C
+for (
 String
-%3E
  locale
-List =
+ :
  Lis
@@ -448,49 +448,8 @@
 zz%22)
-;%0A        for (String locale : localeList
 ) %7B%0A
@@ -596,79 +596,8 @@
 ));%0A
-            System.out.println(locale + %22 v%22 + analyzer.getVersion());%0A
     

Clean up analyzer unit test