@Test
public void should_set_value_relative_to_formInput_in_create_mode() throws Exception {

    ContractToContainerMapper contractToContainerMapper = makeContractToContainerMapper();
    Container container = contractToContainerMapper.create(aSimpleContractWithDataRef(EditMode.CREATE));
    Container formContainer = (Container) container.getRows().get(1).get(0);
    List<Element> firstRow = formContainer.getRows().get(0);
    Component firstNameInput = (Component) firstRow.get(0);
    PropertyValue pValue = firstNameInput.getPropertyValues().get("value");
    assertThat(pValue.getType()).isEqualTo("variable");
    assertThat(pValue.getValue()).isEqualTo("formInput.employeeInput.firstName");
    List<Element> fourthRow = formContainer.getRows().get(4);
    Container managerContainer = (Container) fourthRow.get(0);
    Element managerfirstName = managerContainer.getRows().get(0).get(0);
    pValue = managerfirstName.getPropertyValues().get("value");
    assertThat(pValue.getType()).isEqualTo("variable");
    assertThat(pValue.getValue()).isEqualTo("formInput.employeeInput.manager.firstName");
    List<Element> sixthRow = formContainer.getRows().get(6);
    Container addressContainer = (Container) sixthRow.get(0);
    PropertyValue repeatedCollection = addressContainer.getPropertyValues().get("repeatedCollection");
    assertThat(repeatedCollection.getType()).isEqualTo("variable");
    assertThat(repeatedCollection.getValue()).isEqualTo("formInput.employeeInput.addresses");
    Component streetInput = (Component) addressContainer.getRows().get(0).get(0);
    pValue = streetInput.getPropertyValues().get("value");
    assertThat(pValue.getType()).isEqualTo("variable");
    assertThat(pValue.getValue()).isEqualTo("$item.street");
}