MBeanConstructorInfo[] cstrs = info.getConstructors();
assertEquals(cstrs.length, 6);
Map mapCstrForDesc = makeFeatureMap(cstrs);
// no args constructor
MBeanConstructorInfo cstr =
(MBeanConstructorInfo)mapCstrForDesc.get("The no-args constructor");
assertNotNull(cstr);
assertEquals(cstr.getSignature().length, 0);
// Object constuctor
cstr =
(MBeanConstructorInfo)mapCstrForDesc.get("The Object constructor");
assertNotNull(cstr);
assertEquals(cstr.getSignature().length, 1);
checkParam(cstr.getSignature()[0], "an object", "obj");
// int constructor
cstr = (MBeanConstructorInfo)mapCstrForDesc.get("The int constructor");
assertNotNull(cstr);
assertEquals(cstr.getSignature().length, 1);
checkParam(cstr.getSignature()[0], "a number", "value");
// int[] constructor
cstr =
(MBeanConstructorInfo)mapCstrForDesc.get("The int[] constructor");
assertNotNull(cstr);
assertEquals(cstr.getSignature().length, 1);
checkParam(cstr.getSignature()[0], "an array of int", "intArray");
// Object[] constructor
cstr =
(MBeanConstructorInfo)mapCstrForDesc.get("The Object[] constructor");
assertNotNull(cstr);
assertEquals(cstr.getSignature().length, 1);
checkParam(cstr.getSignature()[0], "an array of Object", "objArray");
// int,Object constructor
cstr =
(MBeanConstructorInfo)mapCstrForDesc.get("A two parameter int,Object constructor");
assertNotNull(cstr);
assertEquals(cstr.getSignature().length, 2);
checkParam(cstr.getSignature()[0], "a number", "a");
checkParam(cstr.getSignature()[1], "an object", "b");
}