code: @SuppressWarnings("unchecked")
      public static <T> T getInternalState(Object object, Class<T> fieldType) {
          Field foundField = findFieldInHierarchy(object, new AssignableToFieldTypeMatcherStrategy(fieldType));
          try {
              return (T) foundField.get(object);
          } catch (IllegalAccessException e) {
              throw new RuntimeException("Internal error: Failed to get field in method getInternalState.", e);
          }
      }
docs: Get the value of a field using reflection. This method will traverse the
  super class hierarchy until the first field of type <tt>fieldType</tt> is
  found. The value of this field will be returned.
  
  @param <T>       the generic type
  @param object    the object to modify
  @param fieldType the type of the field
  @return the internal state