code: public static Object get(final Object bean, final String property) {
  
          try {
              if (property.indexOf(".") >= 0) {
  
                  final Object subBean = ClassMockUtils.get(bean, property.substring(0, property.indexOf(".")));
  
                  if (subBean == null) {
  
                      return null;
                  }
  
                  final String newProperty = property.substring(property.indexOf(".") + 1);
  
                  return ClassMockUtils.get(subBean, newProperty);
              }
  
              Method method = null;
  
              try {
                  method = bean.getClass().getMethod(ClassMockUtils.propertyToGetter(property), new Class[] {});
              } catch (final NoSuchMethodException e) {
                  method = bean.getClass().getMethod(ClassMockUtils.propertyToGetter(property, true), new Class[] {});
              }
  
              return method.invoke(bean, new Object[] {});
  
          } catch (final Exception e) {
  
              throw new RuntimeException("Can't get property " + property + " in the class " + bean.getClass().getName(), e);
          }
      }
docs: Access the value in the property of the bean.
  
  @param bean
  to inspect
  @param property
  the name of the property to be access
  @return the value