@Test(expectedExceptions = {AttributeNotFoundException.class})

public void invalidAttribute() throws MalformedObjectNameException, InstanceNotFoundException, IOException, ReflectionException, AttributeNotFoundException, MBeanException {
    JmxWriteRequest req = new JmxRequestBuilder(WRITE,oName).attribute("ReadOnly").value("Sommer").build();
    handler.doHandleRequest(getMBeanServer(),req);
}