@Test
public void testSetAttribute() throws Exception {

    Attribute attribute = new Attribute("crm.op2", "20/40");
    jmx.setAttribute(attribute);
    assertThat(jmx.getAttribute("crm.op2").toString(), is("20/40"));
    try {
        attribute = new Attribute("something", "20/40");
        jmx.setAttribute(attribute);
        fail("there is no attribute with specified key");
    } catch (AttributeNotFoundException ex) {
        // it's OK
    }
}