ListValue extends PropertyValue { @Override public String toString() { return "List{" + ", size='" + getSize() + '\'' + ", values=" + list + (getMeta().isEmpty()?"":", metaData=" + getMeta()) + '}'; } ListValue(String key); @Override ValueType getValueType(); int getIndex(PropertyValue member); @Override int getSize(); @Override Iterator<PropertyValue> iterator(); ListValue addPropertyValue(PropertyValue value); ListValue addValue(String value); ListValue addValues(String... values); ObjectValue addObject(); ListValue addList(); String getValue(int index); PropertyValue getPropertyValue(int n); List<ObjectValue> getObjects(String name); List<ListValue> getLists(String name); List<ListValue> getLists(); List<PropertyValue> getPropertyValues(String name); @Override ObjectValue toObjectValue(); @Override ListValue toListValue(); String getValue(); @Override PropertyValue setValue(String value); @Override ListValue mutable(); @Override boolean equals(Object o); @Override int hashCode(); @Override String toString(); static ListValue from(Collection<PropertyValue> values);  }
@Test public void testToString() { ListValue lv1 = PropertyValue.createList("foo"); String toString = lv1.toString(); assertThat(toString).isNotNull(); lv1.addList(); toString = lv1.toString(); assertThat(toString).isNotNull(); lv1.addObject(); toString = lv1.toString(); assertThat(toString).isNotNull(); lv1.addValue("valueKey"); toString = lv1.toString(); assertThat(toString).isNotNull(); assertThat("List{, size='3', values=[List{, size='0', values=[]}, Object{size='0', values='{}}, " + "valueKey]}").isEqualTo(toString); }