@Test(expectedExceptions = IllegalStateException.class,expectedExceptionsMessageRegExp = ".*Internal.*")
public void dispatchAtWithException() throws InstanceNotFoundException, IOException, ReflectionException, AttributeNotFoundException, MBeanException, NotChangedException {

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