@Test
public void getOrSetValue() {

    ObjectValue ov = PropertyValue.createObject();
    PropertyValue val = new PropertyValue("k1", "v");
    ov.setPropertyValue(val);
    PropertyValue val2 = ov.getOrSetValue("k2",
            () -> new PropertyValue("foo", "bar"));
    PropertyValue pv = ov.getOrSetValue("foo",  () -> new PropertyValue("foo", "bar"));
    assertThat(pv).isNotNull();
    assertThat(ov.getValues()).hasSize(3);
    assertThat(val).isEqualTo(ov.getPropertyValue("k1"));
    assertThat(val2).isEqualTo(ov.getPropertyValue("k2"));
    assertThat(pv).isEqualTo(ov.getPropertyValue("foo"));
}