OutboundDocRetrieveAggregator_a0 implements NhinAggregator { @Override public void aggregate(OutboundOrchestratable to, OutboundOrchestratable from) { if (to instanceof OutboundDocRetrieveOrchestratable) { if (from instanceof OutboundDocRetrieveOrchestratable) { OutboundDocRetrieveOrchestratable aggregatedResponse = (OutboundDocRetrieveOrchestratable) to; OutboundDocRetrieveOrchestratable fromResponse = (OutboundDocRetrieveOrchestratable) from; try { initializeResponse(aggregatedResponse); streamDocumentsToFileSystemIfEnabled(fromResponse); addAllDocuments(aggregatedResponse, fromResponse); } catch (IOException ioe) { LOG.error("Failed to save document to file system for aggregation.", ioe); fromResponse.getResponse().getRegistryResponse() .setStatus(DocumentConstants.XDS_RETRIEVE_RESPONSE_STATUS_FAILURE); addRegistryError(aggregatedResponse.getResponse()); } setAggregatedStatus(aggregatedResponse, fromResponse); String fromResponseStatus = fromResponse.getResponse().getRegistryResponse().getStatus(); if (DocRetrieveStatusUtil.isStatusFailureOrPartialFailure(fromResponseStatus)) { addRegistryErrors(aggregatedResponse, fromResponse); } } } else { LOG.error("This aggregator only aggregates to OutboundDocRetrieveOrchestratable."); } }  @Override void aggregate(OutboundOrchestratable to, OutboundOrchestratable from);  }
@Test public void testAggregate() { System.out.println("aggregate"); OutboundOrchestratable to = null; OutboundOrchestratable from = null; OutboundDocRetrieveAggregator_a0 instance = new OutboundDocRetrieveAggregator_a0(); instance.aggregate(to, from); }