@Test
public void should_configure_collection_property_of_add_button_with_iterator_if_in_a_repeated_container()
        throws Exception {

    ContractInputToWidgetMapper contractInputToWidgetMapper = makeContractInputToWidgetMapper();
    ContractInput skills = aNodeContractInput("skills")
            .withDataReference(
                    new BusinessDataReference("skills", "org.test.Skill", RelationType.COMPOSITION, LoadingType.EAGER))
            .mulitple().build();
    aNodeContractInput("employee").mulitple().withInput(skills);
    Component button = contractInputToWidgetMapper.createAddButton(skills);
    PropertyValue labelValue = button.getPropertyValues().get("label");
    assertThat(labelValue.getValue()).isEqualTo("<span class=\"glyphicon glyphicon-plus\"></span> Add Skill");
    PropertyValue repeatedCollectionPropetyValue = button.getPropertyValues().get("collectionToModify");
    assertThat(repeatedCollectionPropetyValue.getType()).isEqualTo("variable");
    assertThat(repeatedCollectionPropetyValue.getValue()).isEqualTo("$item.skills");
}