@Test
public void dispatchAtOnce() throws InstanceNotFoundException, IOException, ReflectionException, AttributeNotFoundException, MBeanException, NotChangedException {

    JsonRequestHandler reqHandler = createMock(JsonRequestHandler.class);
    Object result = new Object();
    expect(reqHandler.handleAllServersAtOnce(request)).andReturn(true);
    expect(reqHandler.handleRequest(isA(MBeanServerExecutor.class), eq(request))).andReturn(result);
    replay(reqHandler);
    assertEquals(handler.dispatchRequest(reqHandler, request),result);
}