FeatureSet extends PredicateValue { public FeatureSet addValue(String value) { Objects.requireNonNull(value, "value"); values.add(value); return this; } FeatureSet(String key, String... values);  FeatureSet(String key, Collection<String> values); FeatureSet setKey(String key); String getKey(); FeatureSet addValue(String value); FeatureSet addValues(Collection<String> values); FeatureSet setValues(Collection<String> values); Set<String> getValues(); @Override FeatureSet clone(); @Override int hashCode(); @Override boolean equals(Object obj);  }
@Test public void requireThatValueIsMandatoryInSetter() { FeatureSet node = new FeatureSet("foo", "bar"); try { node.addValue(null); fail(); } catch (NullPointerException e) { assertEquals("value", e.getMessage()); } assertValues(Arrays.asList("bar"), node); }