WildcardQueryConverter implements QueryConverter { @Override public String convert() { String key = this.fieldConverter.convertKey(this.query.getTerm().field()); String value = this.fieldConverter.convertValue(this.query.getTerm().text()); return key + ":" + "'" + value + "'"; } WildcardQueryConverter(WildcardQuery query,
                                  FieldConverter fieldConverter); @Override String convert();  }
@Test public void testWildcardTermQuery() { WildcardQuery query = new WildcardQuery(new Term("a.term", "theResult*")); QueryConverter converter = new WildcardQueryConverter(query, new FieldConverterImpl()); String queryString = converter.convert(); assertThat(queryString).isEqualTo("a__term:'theResult*'"); }