### Question:
QueryResponseImpl implements QueryResponse { @Override public boolean isSortedResponse() { return sortedResponse; } QueryResponseImpl(Set<Resource> resources);  QueryResponseImpl(Set<Resource> resources, boolean sortedResponse,
                           boolean pagedResponse, int totalResourceCount); @Override Set<Resource> getResources(); @Override boolean isSortedResponse(); @Override boolean isPagedResponse(); @Override int getTotalResourceCount();  }### Answer:
@Test public void testIsSortedResponse() throws Exception { Set<Resource> resources = new HashSet<>(); 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()); }