public void testReadWriteAttributeListStandalone() throws Exception {
MBeanServerConnection connection = setupAndGetConnection(new MBeanInfoAdditionalInitialization(TYPE_STANDALONE, new TestExtension()));
ObjectName name = createObjectName(Constants.DOMAIN + ":subsystem=test");
String[] attrNames = new String[] {"roInt", "int", "bigint", "bigdec", "boolean", "bytes", "double", "string", "list", "long", "type"};
AttributeList list = connection.getAttributes(name, attrNames);
Assert.assertEquals(list.size(), attrNames.length);
checkAttributeList(attrNames, list, 1, 2, BigInteger.valueOf(3), BigDecimal.valueOf(4), false, new byte[] {5, 6}, 7.0, "8",
Collections.singletonList(9), 10, ModelType.INT);
list = new AttributeList();
list.add(new Attribute("int", 102));
//TODO BigInteger not working in current DMR version
//list.add(new Attribute("bigint", BigInteger.valueOf(103)));
list.add(new Attribute("bigdec", BigDecimal.valueOf(104)));
list.add(new Attribute("boolean", true));
list.add(new Attribute("bytes", new byte[] {105, 106}));
list.add(new Attribute("double", 107.0));
list.add(new Attribute("string", "108"));
list.add(new Attribute("list", new Integer[] {109}));
list.add(new Attribute("long", 110L));
list.add(new Attribute("type", ModelType.STRING.toString()));
connection.setAttributes(name, list);
list = connection.getAttributes(name, attrNames);
checkAttributeList(attrNames, list, 1, 102, BigInteger.valueOf(103), BigDecimal.valueOf(104), true, new byte[] {105, 106}, 107.0, "108",
Collections.singletonList(109), 110, ModelType.STRING);