public Object getAttribute(String attribute) throws AttributeNotFoundException,
            MBeanException, ReflectionException {
        PropertyDescriptor propertyDescriptor = propertyDescriptors.get(attribute);
        if (propertyDescriptor == null) {
            throw new AttributeNotFoundException(attribute);
        }
        Method getter = propertyDescriptor.getReadMethod();
        if (getter == null) {
            throw new AttributeNotFoundException(
                    format("Getter method for attribute %s of %s", attribute, mbeanClass));
        }
        try {
            if (!getter.isAccessible()) {
                getter.setAccessible(true);
            }
            return getter.invoke(mbean);
        } catch (Exception e) {
            throw new RuntimeException(
                    format("Unable to obtain value of attribute %s of %s", attribute, mbeanClass));
        }
    }