@Test
public void testIsSortedResponse() throws Exception {

  Set<Resource> resources = new HashSet<Resource>();
  resources.add(new ResourceImpl(Resource.Type.Stage));
  QueryResponse queryResponse = new QueryResponseImpl(resources);
  Assert.assertFalse(queryResponse.isSortedResponse());
  queryResponse = new QueryResponseImpl(resources, false, true, 0);
  Assert.assertFalse(queryResponse.isSortedResponse());
  queryResponse = new QueryResponseImpl(resources, true, true, 0);
  Assert.assertTrue(queryResponse.isSortedResponse());
}