instance.importDictionary("test/testD.dicml", "D1"); instance.activateDictionary("D1");
instance.importDictionary("test/testD.dicml", "D1" + SPECIAL_CHARS); instance.activateDictionary("D1" + SPECIAL_CHARS);
  public void testGetMatchingLemma() {    System.out.println("getMatchingLemma");        String name = "Ma";    SQLiteProvider instance = new SQLiteProvider("owl.db");        instance.importDictionary("test/testMatch.dicml", "Match");    instance.activateDictionary("Match");        List<String[]> result = instance.getMatchingLemma(name);    if(result.size() != 1)      fail("there should be *exactly* one match for \"Ma\"");        name = "Mis";    result = instance.getMatchingLemma(name);    if(result.size() != 1)      fail("there should be *exactly* one match for \"Mis\"");        name = "M";    result = instance.getMatchingLemma(name);    if(result.size() != 2)      fail("there should be *exactly* two matches for \"M\"");    name = "sönder";    result = instance.getMatchingLemma(name);    if(result.size() != 1)      fail("there should be *exactly* one match for \"sönder\"");    name = "SÖNDER";    result = instance.getMatchingLemma(name);    if(result.size() != 1)      fail("there should be *exactly* one match for \"SÖNDER\"");        name = "Sönderzeichen";    result = instance.getMatchingLemma(name);    if(result.size() != 1)      fail("there should be *exactly* one match for \"Sönderzeichen\"");            name = "Nons";    result = instance.getMatchingLemma(name);    if(result.size() != 0)      fail("there should be *no* match for \"Nons\"");        name = "short";    String expResult = "short";     result = instance.getMatchingLemma(name);    if(result.size() != 1)      fail("there should be a match for \"short\"");    assertEquals(expResult, result.get(0)[0]);        name = "short";    expResult = "short";     result = instance.getMatchingLemma(name, null);    if(result.size() != 1)      fail("there should be a match for \"short\"");    assertEquals(expResult, result.get(0)[0]);        instance.importDictionary("test/testC.dicml", "NewDic");    instance.activateDictionary("NewDic");        result = instance.getMatchingLemma("C");    assertEquals("NewDic", result.get(0)[1]);        result = instance.getMatchingLemma("MisMAtch");    assertEquals("Match", result.get(0)[1]);            instance.importDictionary("test/testD.dicml", "D1");    instance.activateDictionary("D1");    instance.importDictionary("test/testD2.dicml", "D2");        result = instance.getMatchingLemma("D", "D2");    if(result.size() != 2)      fail("there should be *exactly* two matches for \"D\" in D2 - found " + result.size());    assertEquals("D2", result.get(0)[1]);            instance.activateDictionary("D2");    result = instance.getMatchingLemma("D", "D2");    if(result.size() != 2)      fail("there should be *exactly* two matches for \"D\" in D2 - found " + result.size());    assertEquals("D2", result.get(0)[1]);          }