OutboundDocQueryAggregator implements NhinAggregator { protected void aggregate(AdhocQueryResponse aggregate, AdhocQueryResponse single) { aggregateStatus(aggregate, single); aggregateRegistryObjectList(aggregate, single); aggregateRegistryErrors(aggregate, single); aggregateSlotlistResponse(aggregate, single); increaseCount(aggregate); }  void increaseCount(AdhocQueryResponse aggregate); void aggregate(OutboundDocQueryOrchestratable to, OutboundDocQueryOrchestratable from); @Override void aggregate(OutboundOrchestratable to, OutboundOrchestratable from);  }
@Test public void testAggregateNullResponse() { OutboundDocQueryOrchestratable aggregatedOrchestrable = new OutboundDocQueryOrchestratable(); OutboundDocQueryOrchestratable individualOrchestrable = new OutboundDocQueryOrchestratable(); individualOrchestrable.setResponse(null); nhinAggregator.aggregate(aggregatedOrchestrable, individualOrchestrable); assertEquals(DocumentConstants.XDS_QUERY_RESPONSE_STATUS_FAILURE, aggregatedOrchestrable.getResponse() .getStatus()); assertNotNull(aggregatedOrchestrable.getResponse().getRegistryErrorList()); assertEquals(1, aggregatedOrchestrable.getResponse().getRegistryErrorList().getRegistryError().size()); assertEquals("Null response.", aggregatedOrchestrable.getResponse().getRegistryErrorList().getRegistryError() .get(0).getCodeContext()); }