@Test
public void should_not_generate_table_widget_when_child_object_is_not_multiple() {

    BusinessObjectContainer boc = new BusinessObjectContainer();
    BusinessDataToWidgetMapper businessDataToWidgetMapper = makeBusinessDataToWidgetMapper(boc);
    NodeBusinessObjectInput childNode = aNestedObjectInLazyAggregation(true);
    childNode.setMultiple(false);
    businessDataToWidgetMapper.generateMasterDetailsPattern(childNode, boc.getContainer().getRows());
    Component title = (Component) boc.getContainer().getRows().get(0).get(0);
    assertThat(title.getId()).isEqualTo("pbTitle");
    PropertyValue titleCollectionPropertyValue = title.getPropertyValues().get("text");
    assertThat(titleCollectionPropertyValue.getType()).isEqualTo("interpolation");
    assertThat(titleCollectionPropertyValue.getValue()).isEqualTo("Addresses");
    List<Element> detailsRows = boc.getContainer().getRows().get(1);
    assertThat(detailsRows.size()).isEqualTo(2);
    Map<String, Variable> variables = boc.getBusinessObjectVariable();
    assertThat(variables.get("customer_addresses").getType()).isEqualTo(DataType.URL);
    assertThat(variables.get("customer_addresses").getValue().get(0)).isEqualTo("{{customer_selected|lazyRef:'addresses'}}");
}