map.put("map", 1);
TestEnum enumeration = TestEnum.FIRST;
CollectionsMXBeanSupport support = new CollectionsMXBeanSupport(array, collection, set, list, map, enumeration);
ObjectName objectName = CollectionsMXBeanSupportMXBean.REGISTERED_OBJECT_NAME;
server.registerMBean(support, objectName);
CollectionsMXBeanSupportMXBean proxy = MXBeanFactory.makeProxy(server, objectName, CollectionsMXBeanSupportMXBean.class);
OpenMBeanInfo info = (OpenMBeanInfo) server.getMBeanInfo(objectName);
String[] changedArray = { "arrayChanged" };
Collection<String> changedCollection = new ArrayList<String>();
changedCollection.add("collectionChanged");
Set<String> changedSet = new LinkedHashSet<String>();
changedSet.add("setChanged");
List<String> changedList = new ArrayList<String>();
changedList.add("listChanged");
Map<String, Integer> changedMap = new LinkedHashMap<String, Integer>();
changedMap.put("mapChanged", 2);
TestEnum changedEnumeration = TestEnum.SECOND;
proxy.setArray(changedArray);
proxy.setCollection(changedCollection);
proxy.setEnum(changedEnumeration);
proxy.setList(changedList);
proxy.setMap(changedMap);
proxy.setSet(changedSet);
Object[] changedValues = { changedArray, changedCollection, changedSet, changedList, changedMap, changedEnumeration };
checkAttributes(CollectionsMXBeanSupportMXBean.class, proxy, support, CollectionsInterface.KEYS, CollectionsInterface.TYPES, changedValues, info);
}