verify(request, resource, query, predicate);
}
@Test
public void testHandleRequest__UnsupportedPropertyException() throws Exception {
Request request = createStrictMock(Request.class);
ResourceInstance resource = createStrictMock(ResourceInstance.class);
Query query = createMock(Query.class);
Predicate predicate = createMock(Predicate.class);
UnsupportedPropertyException exception = new UnsupportedPropertyException(
Resource.Type.Cluster, Collections.singleton("foo"));
expect(request.getResource()).andReturn(resource);
expect(resource.getQuery()).andReturn(query);
expect(request.getPageRequest()).andReturn(null);
expect(request.isMinimal()).andReturn(false);
expect(request.getFields()).andReturn(Collections.<String, TemporalInfo>emptyMap());
expect(request.getQueryPredicate()).andReturn(predicate);
query.setUserPredicate(predicate);
query.setPageRequest(null);
query.setMinimal(false);
expect(query.execute()).andThrow(exception);