@@ -0,0 +1,914 @@
+import static org.junit.Assert.*;%0A%0Aimport org.junit.Test;%0A%0Aimport de.ids_mannheim.korap.query.serialize.ExpertFilter;%0Aimport de.ids_mannheim.korap.util.QueryException;%0A%0Apublic class ExpertFilterTest %7B%0A%09%0A%09ExpertFilter ef;%0A%09String map;%0A%09private String query;%0A%0A%09private boolean equalsQueryContent(String res, String query) throws QueryException %7B%0A%09%09res = res.replaceAll(%22 %22, %22%22);%0A%09%09ef = new ExpertFilter();%0A%09%09ef.process(query);%0A%09%09String queryMap = ef.getRequestMap().get(%22query%22).toString().replaceAll(%22 %22, %22%22);%0A%09%09return res.equals(queryMap);%0A%09%7D%0A%09%0A%09@Test%0A%09public void testSimple() throws QueryException %7B%0A%09%09query = %22textClass=Sport%22;%0A%09%09String regex1 = %22%7B@type=korap:filter, filter=%7B@type=korap:term, attribute=textClass, key=Sport, match=match:eq%7D%7D%22;%0A%09%09ef = new ExpertFilter();%0A%09%09ef.process(query);%0A%09%09map = ef.getRequestMap().toString();%0A%09%09assertEquals(regex1.replaceAll(%22 %22, %22%22), map.replaceAll(%22 %22, %22%22));%0A%09%7D%0A%09%0A%09%0A%7D%0A%0A

test class for expert filter