MetadataElement implements NameValuePair, Cloneable { @Override public void setValue(String value) { this.value = Args.notNull(value, "value"); } MetadataElement();  MetadataElement(KeyValuePair kp);  MetadataElement(String key, String value); @Override void setKey(String key); @Override String getKey(); @Override void setValue(String value); @Override String getValue(); @Override String toString(); @Override boolean equals(Object obj); @Override int hashCode(); @Override Object clone();  }
@Test public void testSetValue() { try { me1.setValue(null); fail("should raise an IllegalArgumentException"); } catch (IllegalArgumentException e) { } try { me1.setValue(""); } catch (IllegalArgumentException e) { fail("empty is allowed"); } }