@Test
public void should_create_a_Select_widget_for_aggregated_dataRef() throws Exception {

    ContractToContainerMapper contractToContainerMapper = makeContractToContainerMapper();
    Container container = contractToContainerMapper.create(aContractWithDataRefAndAggregation(EditMode.EDIT));
    Container formContainer = (Container) container.getRows().get(1).get(0);
    List<Element> fourthRow = formContainer.getRows().get(3);
    Component managerSelect = (Component) fourthRow.get(0);
    assertThat(managerSelect.getId()).isEqualTo("pbSelect");
    PropertyValue pValue = managerSelect.getPropertyValues().get("availableValues");
    assertThat(pValue.getType()).isEqualTo("expression");
    assertThat(pValue.getValue()).isEqualTo("employee_query");
    pValue = managerSelect.getPropertyValues().get("value");
    assertThat(pValue.getType()).isEqualTo("variable");
    assertThat(pValue.getValue()).isEqualTo("employee.manager");
}