null,
"AType",
MBeanOperationInfo.ACTION
);
ModelMBeanInfoSupport info = new ModelMBeanInfoSupport(
mbean.getClass().getName(),
"some description",
new ModelMBeanAttributeInfo[] { attr1, attr2 },
new ModelMBeanConstructorInfo[] { constr1, constr2, constr3 },
new ModelMBeanOperationInfo[] { operation },
null
);
Descriptor descr1 = info.getDescriptor("SecondConstructor", "constructor");
assertEquals("SecondConstructor", descr1.getFieldValue("name"));
assertEquals("constructor", descr1.getFieldValue("role"));
Descriptor descr2 = null;
Descriptor[] descr3 = info.getDescriptors("operation");
assertEquals("operation", descr3[0].getFieldValue("descriptorType"));
assertEquals("AnOperation", descr3[0].getFieldValue("name"));
descr1.setField("someField", "someValue");
descr3[0].setField("Yksi", "Kaksi");
info.setDescriptors(new Descriptor[] { descr1, descr2, descr3[0] });
descr1 = info.getDescriptor("SecondConstructor", "constructor");
assertEquals("SecondConstructor", descr1.getFieldValue("name"));
assertEquals("constructor", descr1.getFieldValue("role"));
assertEquals("FAILS IN JBOSSMX", "someValue", descr1.getFieldValue("someField"));
descr1 = info.getDescriptor("AnOperation", "operation");
assertEquals("AnOperation", descr1.getFieldValue("name"));
assertEquals("Kaksi", descr1.getFieldValue("Yksi"));
}