@Test
public void add_a_children_components_embedded_in_a_container_when_visiting_a_node_contract_input()
        throws Exception {

    Page page = new Page();
    new ContractInputVisitorImpl(page, contractInputToWidgetMapper)
            .visit((NodeContractInput) ContractInputBuilder.aNodeContractInput("employee").withInput(
                    ContractInputBuilder.aStringContractInput("firstName"),
                    ContractInputBuilder.aStringContractInput("lastName")).build());
    assertThat(page.getRows()).hasSize(2);//one for the container label, one for the container
    List<Element> firstRow = page.getRows().get(0);
    assertThat(firstRow).hasSize(1);
    assertThat(firstRow.get(0)).isInstanceOf(Component.class);
    assertThat(((Component) firstRow.get(0)).getId()).isEqualTo("pbTitle");
    assertThat(firstRow.get(0).getPropertyValues()).contains(
            entry(ParameterConstants.TEXT_PARAMETER, aInterpolationPropertyValue("Employee")));
    List<Element> secondRow = page.getRows().get(1);
    assertThat(secondRow).hasSize(1);
    assertThat(secondRow.get(0)).isInstanceOf(Container.class);
    Container container = (Container) secondRow.get(0);
    assertThat(container.getRows()).hasSize(2);
    assertThat(container.getRows().get(0)).hasSize(1);
    Component firstNameComponent = (Component) container.getRows().get(0).get(0);
    assertThat(firstNameComponent.getId()).isEqualTo("pbInput");
    assertThat(firstNameComponent.getPropertyValues()).contains(
            entry(ParameterConstants.LABEL_PARAMETER, aInterpolationPropertyValue("First Name")));
    Component lastNameComponent = (Component) container.getRows().get(1).get(0);
    assertThat(lastNameComponent.getId()).isEqualTo("pbInput");
    assertThat(lastNameComponent.getPropertyValues()).contains(
            entry(ParameterConstants.LABEL_PARAMETER, aInterpolationPropertyValue("Last Name")));
}