private List<MBeanAttribute> getAttributes(ObjectName name,
			MBeanAttributeInfo[] attributeInfos) {
		final List<String> attributeNames = new ArrayList<>(attributeInfos.length);
		for (final MBeanAttributeInfo attribute : attributeInfos) {
			// on ne veut pas afficher l'attribut password, jamais
			// (notamment, dans users tomcat ou dans datasources tomcat)
			// et on ne veut pas afficher l'attribut configurationAsProperties d'infinispan (issue 1180)
			if (attribute.isReadable() && !"password".equalsIgnoreCase(attribute.getName())
					&& !"configurationAsProperties".equalsIgnoreCase(attribute.getName())) {
				attributeNames.add(attribute.getName());
			}
		}
		final String[] attributeNamesArray = attributeNames.toArray(new String[0]);
		final List<MBeanAttribute> result = new ArrayList<>();
		try {
			final List<Attribute> attributes = mbeanServer.getAttributes(name, attributeNamesArray)
					.asList();
			for (final Attribute attribute : attributes) {
				final Object value = convertValueIfNeeded(attribute.getValue());
				final String attributeDescription = getAttributeDescription(attribute.getName(),
						attributeInfos);
				final String formattedAttributeValue = formatAttributeValue(value);
				final MBeanAttribute mbeanAttribute = new MBeanAttribute(attribute.getName(),
						attributeDescription, formattedAttributeValue);
				result.add(mbeanAttribute);
			}
		} catch (final Exception e) {
			// issue 201: do not stop to render MBeans tree when exception in mbeanServer.getAttributes
			final MBeanAttribute mbeanAttribute = new MBeanAttribute("exception", null,
					e.toString());
			result.add(mbeanAttribute);
		}
		return result;
	}
@Test
	public void testToString() {
		final MBeanNode mBeanNode = new MBeanNode("name", "description",
				List.of(new MBeanAttribute("name", "description", "formattedValue")));
		assertNotNull("mbeanNode", mBeanNode);
		assertNotNull("toString", mBeanNode.toString());
		assertNotNull("getAttributes", mBeanNode.getAttributes());
		for (final MBeanAttribute attribute : mBeanNode.getAttributes()) {
			assertNotNull("attribute", attribute);
			assertNotNull("toString", attribute.toString());
		}
	}