.title("ptitle1")
.description("pdesc1")
.build()
);
Description build1 = builder.build();
assertProperties(build1, 1, Arrays.asList("ptest1"));
Property p1 = build1.getProperties().get(0);
assertEquals("ptest1", p1.getName());
assertEquals("ptitle1", p1.getTitle());
assertEquals("pdesc1", p1.getDescription());
assertEquals(null, p1.getDefaultValue());
assertEquals(Property.Type.String, p1.getType());
//replace ptest1 with another type
builder.property(
builder
.property("ptest1")//get the property builder for existing property
.type(Property.Type.Boolean) //set new type
.description("pdesc2") //set new desc
.defaultValue("pdef2") //set new default
);
Description build = builder.build();
assertProperties(build, 1, Arrays.asList("ptest1"));
Property p = build.getProperties().get(0);
assertEquals("ptest1", p.getName());
assertEquals("ptitle1", p.getTitle());
assertEquals("pdesc2", p.getDescription());
assertEquals("pdef2", p.getDefaultValue());
assertEquals(Property.Type.Boolean, p.getType());