@Test
public void should_update_an_existing_property() throws Exception {

    Property initialParam = aProperty().name("propertyName").label("propertyLabel").build();
    Property updatedParam = aProperty().name("newName").label("newLablel").build();
    Widget aWidget = addToRepository(aWidget().custom().property(initialParam).build());
    widgetRepository.updateProperty(aWidget.getId(), initialParam.getName(), updatedParam);
    Widget widget = getFromRepository(aWidget.getId());
    assertThat(widget.getProperties()).contains(updatedParam);
    assertThat(widget.getProperties()).doesNotContain(initialParam);
}