class DefaultRecursiveAssertionIntrospectionStrategy implements RecursiveAssertionIntrospectionStrategy {

  @Override
  public List<RecursiveAssertionNode> getChildNodesOf(Object node) {
    return getDeclaredFieldsIncludingInherited(node.getClass()).stream()
                                                               .map(field -> toNode(field, node))
                                                               .collect(toList());
  }

  @Override
  public String getDescription() {
    return "DefaultRecursiveAssertionIntrospectionStrategy which introspects all fields (including inherited ones)";
  }

  private static RecursiveAssertionNode toNode(Field field, Object node) {
    String fieldName = field.getName();
    Object fieldValue = EXTRACTION.getSimpleValue(fieldName, node);
    Class<?> fieldType = getFieldType(fieldValue, fieldName, node);
    return new RecursiveAssertionNode(fieldValue, fieldName, fieldType);
  }

  private static Class<?> getFieldType(Object fieldValue, String fieldName, Object targetObject) {
    return fieldValue != null ? fieldValue.getClass() : getFieldType(fieldName, targetObject.getClass());
  }

  private static Class<?> getFieldType(String fieldName, Class<?> objectClass) {<FILL_FUNCTION_BODY>}

}

    try {
      Optional<Field> potentialField = stream(objectClass.getDeclaredFields()).filter(field -> fieldName.equals(field.getName()))
                                                                              .findAny();
      if (potentialField.isPresent()) return potentialField.get().getType();
      Class<?> superclass = objectClass.getSuperclass();
      if (superclass != null) return getFieldType(fieldName, superclass);
      throw new NoSuchFieldException();
    } catch (NoSuchFieldException | SecurityException e) {
      throw new IllegalStateException(format("Could not find field %s on class %s, even though its name was retrieved from the class earlier",
                                             fieldName, objectClass.getCanonicalName()),
                                      e);
    }
  
<no_super_class>