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