{
// testcase for bug #794320
// Test that only name and descriptorType are mandatory
Descriptor descriptor = new DescriptorSupport(new String[]{"name", "descriptortype", "default"},
new String[]{"attribute1", "attribute", "default"});
ModelMBeanAttributeInfo attribute
= new ModelMBeanAttributeInfo("attribute1", "java.lang.String", "An attribute", true, true, false, descriptor);
// in case of bug #794320 the descriptor is overrided
assertEquals(attribute.getDescriptor().getFieldValue("default"), "default");
assertNull(attribute.getDescriptor().getFieldValue("value"));
}