public void testHandleRequest__Synchronous_NoPropsInBody() throws Exception {
Request request = createMock(Request.class);
RequestBody body = createNiceMock(RequestBody.class);
ResourceInstance resource = createMock(ResourceInstance.class);
PersistenceManager pm = createStrictMock(PersistenceManager.class);
RequestStatus status = createMock(RequestStatus.class);
Resource resource1 = createMock(Resource.class);
Resource resource2 = createMock(Resource.class);
Predicate userPredicate = createNiceMock(Predicate.class);
Query query = createNiceMock(Query.class);
Set<Resource> setResources = new HashSet<Resource>();
setResources.add(resource1);
setResources.add(resource2);
// expectations
expect(request.getResource()).andReturn(resource).atLeastOnce();
expect(request.getBody()).andReturn(body).atLeastOnce();
expect(request.getQueryPredicate()).andReturn(userPredicate).atLeastOnce();
expect(resource.getQuery()).andReturn(query).atLeastOnce();
query.setUserPredicate(userPredicate);
expect(pm.delete(resource, body)).andReturn(status);
expect(status.getStatus()).andReturn(RequestStatus.Status.Complete);
expect(status.getAssociatedResources()).andReturn(setResources);
expect(resource1.getType()).andReturn(Resource.Type.Cluster).anyTimes();
expect(resource2.getType()).andReturn(Resource.Type.Cluster).anyTimes();
replay(request, body, resource, pm, status, resource1, resource2, userPredicate, query);