System.arraycopy(substring, 0,
chars, Context.MAXFILEREAD - substring.length,
substring.length);
Reader in = new CharArrayReader(chars);
QueryBuilder qb = new QueryBuilder().setFreetext("test");
Context c = new Context(qb.build(), qb.getQueries());
StringWriter out = new StringWriter();
boolean match =
c.getContext(in, out, "", "", "", null, true, qb.isDefSearch(),null);
assertTrue("No match found", match);
String s = out.toString();