public void dispatchRequest() throws MalformedObjectNameException, InstanceNotFoundException, ReflectionException, AttributeNotFoundException, MBeanException, IOException, NotChangedException {
JsonRequestHandler reqHandler = createMock(JsonRequestHandler.class);
Object result = new Object();
expect(reqHandler.handleAllServersAtOnce(request)).andReturn(false);
expect(reqHandler.handleRequest(EasyMock.<MBeanServerConnection>anyObject(), eq(request))).andReturn(result);
replay(reqHandler);
assertEquals(handler.dispatchRequest(reqHandler, request),result);
}