@Override
  public <T> boolean needScatterGather(Request<T> request)
  {
    if (!isSupportedScatterGatherRequest(request))
    {
      return false;
    }
    final String serviceName = request.getServiceName();
    try
    {
      return _uriMapper.needScatterGather(serviceName);
    }
    catch (ServiceUnavailableException e)
    {
      log.error("Unable to determine scatter-gather capability for service :" + serviceName + " and treat as unsupported!", e);
      return false;
    }
  }
@Test(dataProvider = "requestMethodProvider")
  public void testIsScatterGatherNeeded(ResourceMethod requestMethod, boolean sgNeeded) throws ServiceUnavailableException
  {
    Request<?> request = mock(Request.class);
    when(request.getServiceName()).thenReturn(TEST_SERVICE);
    // service is not supporting scatter gather
    when(_uriMapper.needScatterGather(TEST_SERVICE)).thenReturn(false);
    Assert.assertFalse(_sgStrategy.needScatterGather(request));
    // resource method is not supported
    when(_uriMapper.needScatterGather(TEST_SERVICE)).thenReturn(true);
    when(request.getMethod()).thenReturn(requestMethod);
    Assert.assertEquals(_sgStrategy.needScatterGather(request), sgNeeded);
  }