@Test
public void singleBeanMultiAttributesWithAWrongAttributeNameHandlingException() throws Exception {

    JmxReadRequest request = new JmxRequestBuilder(READ, testBeanName.getCanonicalName()).
            attributes(Arrays.asList("attr0", "attr1")).
            option(ConfigKey.IGNORE_ERRORS, "true").
            build();
    MBeanServer server = createMock(MBeanServer.class);
    expect(server.isRegistered(testBeanName)).andStubReturn(true);
    expect(server.getAttribute(testBeanName,"attr0")).andReturn("val0");
    expect(server.getAttribute(testBeanName,"attr1")).andThrow(new AttributeNotFoundException("Couldn't find attr1"));
    replay(server);
    Map res = (Map) handler.handleRequest(getMBeanServerManager(server),request);
    verify(server);
    assertEquals("val0",res.get("attr0"));
    String err = (String) res.get("attr1");
    assertTrue(err != null && err.contains("ERROR"));
}