OutboundDocQueryAggregator implements NhinAggregator { protected void aggregateSlotlistResponse(AdhocQueryResponse aggregatedResponse, AdhocQueryResponse individualResponse) { SlotListType individualResponseSlotList = individualResponse.getResponseSlotList(); if (individualResponseSlotList != null && CollectionUtils.isNotEmpty(individualResponseSlotList.getSlot())) { aggregatedResponse.getResponseSlotList().getSlot().addAll(individualResponseSlotList.getSlot()); } }  void increaseCount(AdhocQueryResponse aggregate); void aggregate(OutboundDocQueryOrchestratable to, OutboundDocQueryOrchestratable from); @Override void aggregate(OutboundOrchestratable to, OutboundOrchestratable from);  }
@Test public void testAggregateSlotlistResponse() { AdhocQueryResponse aggregatedResponse = new AdhocQueryResponse(); AdhocQueryResponse individualResponse = new AdhocQueryResponse(); aggregatedResponse.setResponseSlotList(new SlotListType()); nhinAggregator.aggregateSlotlistResponse(aggregatedResponse, individualResponse); assertEquals(0, aggregatedResponse.getResponseSlotList().getSlot().size()); individualResponse.setResponseSlotList(new SlotListType()); individualResponse.getResponseSlotList().getSlot().add(new SlotType1()); nhinAggregator.aggregateSlotlistResponse(aggregatedResponse, individualResponse); assertEquals(1, aggregatedResponse.getResponseSlotList().getSlot().size()); }