JSONFilterConfigurationData extends WSOkapiFilterConfigurationData<Parameters> { public void setExcludedKeys(List<String> excludedKeys) { Parameters params = getParameters(); StringBuilder sb = new StringBuilder("^("); boolean first = true; for (String key : excludedKeys) { if (first) { first = false; } else { sb.append("|"); } appendExcludedKey(sb, key); } sb.append(")$"); params.setExceptions(sb.toString()); setParameters(params); }  void setExcludedKeys(List<String> excludedKeys);  }
@Test public void testToXML() throws Exception { JSONFilterConfigurationData data = new JSONFilterConfigurationData(); data.setExcludedKeys(Collections.singletonList("hello")); assertEquals(CONFIG_XML, ConfigTestUtils.toXML(data)); }