" <arg type=\"int\" value=\"77\" />\n" +
" </constructor>" +
"</mbean>";
Element e = XMLUtil.stringToElement(s);
MBeanConfigurationElement mbeanConfig = new MBeanConfigurationElement(e);
assertEquals(new ObjectName("somedomain:service=SomeService"), mbeanConfig.getObjectName());
assertEquals("org.example.SomeClass", mbeanConfig.getMBeanClassName());
assertEquals(String.class, mbeanConfig.getConstructorArgumentType(0, 0));
assertEquals("blah", mbeanConfig.getConstructorArgumentValue(0, 0));
assertEquals(Integer.class, mbeanConfig.getConstructorArgumentType(0, 1));
assertEquals("55", mbeanConfig.getConstructorArgumentValue(0, 1));
assertEquals(Integer.TYPE, mbeanConfig.getConstructorArgumentType(0, 2));
assertEquals("77", mbeanConfig.getConstructorArgumentValue(0, 2));
// test constructor argument value change
mbeanConfig.setConstructorArgumentValue(0, 0, "xerxex");
assertEquals("xerxex", mbeanConfig.getConstructorArgumentValue(0, 0));
}