MBeanServer server = createMBeanServer();
SimpleObject composite = new SimpleObject();
CompositeMXBeanSupport support = new CompositeMXBeanSupport("Simple", composite);
ObjectName objectName = CompositeMXBeanSupportMXBean.REGISTERED_OBJECT_NAME;
server.registerMBean(support, objectName);
CompositeMXBeanSupportMXBean proxy = MXBeanFactory.makeProxy(server, objectName, CompositeMXBeanSupportMXBean.class);
OpenMBeanInfo info = (OpenMBeanInfo) server.getMBeanInfo(objectName);
SimpleObject changed = new SimpleObject();
changed.setBigDecimal(SimpleInterface.bigDecimalChangedValue);
changed.setBigInteger(SimpleInterface.bigIntegerChangedValue);
changed.setBoolean(SimpleInterface.booleanChangedValue);
changed.setByte(SimpleInterface.byteChangedValue);
changed.setCharacter(SimpleInterface.characterChangedValue);
changed.setDate(SimpleInterface.dateChangedValue);
changed.setDouble(SimpleInterface.doubleChangedValue);
changed.setFloat(SimpleInterface.floatChangedValue);
changed.setInteger(SimpleInterface.integerChangedValue);
changed.setLong(SimpleInterface.longChangedValue);
changed.setObjectName(SimpleInterface.objectNameChangedValue);
changed.setPrimitiveBoolean(SimpleInterface.primitiveBooleanChangedValue);
changed.setPrimitiveByte(SimpleInterface.primitiveByteChangedValue);
changed.setPrimitiveChar(SimpleInterface.primitiveCharChangedValue);
changed.setPrimitiveDouble(SimpleInterface.primitiveDoubleChangedValue);
changed.setPrimitiveFloat(SimpleInterface.primitiveFloatChangedValue);
changed.setPrimitiveInt(SimpleInterface.primitiveIntChangedValue);
changed.setPrimitiveLong(SimpleInterface.primitiveLongChangedValue);
changed.setPrimitiveShort(SimpleInterface.primitiveShortChangedValue);
changed.setShort(SimpleInterface.shortChangedValue);
changed.setString(SimpleInterface.stringChangedValue);
proxy.setSimple("Changed");
proxy.setComposite(changed);
Object[] values = new Object[] { "Changed", changed };
checkAttributes(CompositeMXBeanSupportMXBean.class, proxy, support, CompositeInterface.KEYS, CompositeInterface.TYPES, values, info);
}