BusinessQueryDataFactory { public Set<PageData> create(Contract contract) { Set<PageData> pageData = new HashSet<>(); searchAggregatedDataReferences(contract.getInput(), pageData); return pageData; }  Set<PageData> create(Contract contract);  }
@Test public void should_create_queryBusinessData_for_aggregated_dataRef_in_contract() throws Exception { BusinessQueryDataFactory factory = new BusinessQueryDataFactory(); Set<PageData> data = factory.create(aContractWithDataRefAndAggregation(EditMode.EDIT)); assertThat(data).hasSize(1); assertThat(data.iterator().next().name()).isEqualTo("employee_query"); }