OutboundDocQueryAggregator implements NhinAggregator { protected boolean areTheStatusesDifferent(final String aggregateStatus, final String individualStatus) { return !aggregateStatus.equalsIgnoreCase(individualStatus); }  void increaseCount(AdhocQueryResponse aggregate); void aggregate(OutboundDocQueryOrchestratable to, OutboundDocQueryOrchestratable from); @Override void aggregate(OutboundOrchestratable to, OutboundOrchestratable from);  }
@Test public void testAreTheyDifferent() { assertFalse(nhinAggregator.areTheStatusesDifferent(DocumentConstants.XDS_QUERY_RESPONSE_STATUS_FAILURE, DocumentConstants.XDS_QUERY_RESPONSE_STATUS_FAILURE)); assertFalse(nhinAggregator.areTheStatusesDifferent(DocumentConstants.XDS_QUERY_RESPONSE_STATUS_SUCCESS, DocumentConstants.XDS_QUERY_RESPONSE_STATUS_SUCCESS)); assertFalse(nhinAggregator.areTheStatusesDifferent(DocumentConstants.XDS_QUERY_RESPONSE_STATUS_PARTIAL_SUCCESS, DocumentConstants.XDS_QUERY_RESPONSE_STATUS_PARTIAL_SUCCESS)); assertTrue(nhinAggregator.areTheStatusesDifferent(DocumentConstants.XDS_QUERY_RESPONSE_STATUS_FAILURE, DocumentConstants.XDS_QUERY_RESPONSE_STATUS_SUCCESS)); assertTrue(nhinAggregator.areTheStatusesDifferent(DocumentConstants.XDS_QUERY_RESPONSE_STATUS_SUCCESS, DocumentConstants.XDS_QUERY_RESPONSE_STATUS_PARTIAL_SUCCESS)); assertTrue(nhinAggregator.areTheStatusesDifferent(DocumentConstants.XDS_QUERY_RESPONSE_STATUS_PARTIAL_SUCCESS, DocumentConstants.XDS_QUERY_RESPONSE_STATUS_FAILURE)); }