### Question:
LuceneToJexlControlledQueryParser extends LuceneToJexlQueryParser implements ControlledQueryParser { @Override public void setExcludedValues(Map<String,Set<String>> excludedValues) { this.excludedValues = excludedValues; } LuceneToJexlControlledQueryParser(); @Override QueryNode parse(String query); @Override void setExcludedValues(Map<String,Set<String>> excludedValues); @Override Map<String,Set<String>> getExcludedValues(); @Override void setIncludedValues(Map<String,Set<String>> includedValues); @Override Map<String,Set<String>> getIncludedValues();  }### Answer:
@Test public void testExcludedValues() throws ParseException { parser = new LuceneToJexlControlledQueryParser(); Set<String> allowedFields = new HashSet<>(); allowedFields.add("FIELD1"); allowedFields.add("FIELD2"); allowedFields.add("FIELD3"); parser.setAllowedFields(allowedFields); Map<String,Set<String>> excludedValues = new LinkedHashMap<>(); excludedValues.put("FIELD2", Collections.singleton("specialvalue2")); excludedValues.put("FIELD3", Collections.singleton("specialvalue3")); parser.setExcludedValues(excludedValues); Assert.assertEquals( "(FIELD1 == 'value') && ((not(filter:includeRegex(FIELD2, 'specialvalue2'))) && (not(filter:includeRegex(FIELD3, 'specialvalue3'))))", parseQuery("FIELD1:value")); }