@Test
public void testHandleRequest__NoSuchResourceException_OK() throws Exception {
Request request = createStrictMock(Request.class);
ResourceInstance resource = createStrictMock(ResourceInstance.class);
Query query = createMock(Query.class);
Predicate predicate = createMock(Predicate.class);
NoSuchResourceException exception = new NoSuchResourceException("msg", new RuntimeException());
Renderer renderer = new DefaultRenderer();
expect(request.getResource()).andReturn(resource);
expect(resource.getQuery()).andReturn(query);
expect(request.getPageRequest()).andReturn(null);
expect(request.getRenderer()).andReturn(renderer);
expect(request.getFields()).andReturn(Collections.<String, TemporalInfo>emptyMap());
expect(request.getQueryPredicate()).andReturn(predicate).anyTimes();
query.setUserPredicate(predicate);
query.setPageRequest(null);
query.setRenderer(renderer);
expect(query.execute()).andThrow(exception);
replay(request, resource, query, predicate);
//test
ReadHandler handler = new ReadHandler();