class ShouldBeEqualByComparingFieldByFieldRecursively extends BasicErrorMessageFactory {

  public static ErrorMessageFactory shouldBeEqualByComparingFieldByFieldRecursive(Object actual, Object other,
                                                                                  List<Difference> differences,
                                                                                  Representation representation) {
    List<String> descriptionOfDifferences = differences.stream()
                                                       .map(difference -> describeDifference(difference, representation))
                                                       .collect(toList());
    return new ShouldBeEqualByComparingFieldByFieldRecursively("%n" +
                                                               "Expecting actual:%n" +
                                                               "  %s%n" +
                                                               "to be equal to:%n" +
                                                               "  %s%n" +
                                                               "when recursively comparing field by field, but found the following difference(s):%n"
                                                               + join(descriptionOfDifferences).with(format("%n")),
                                                               actual, other);
  }

  public static ErrorMessageFactory shouldBeEqualByComparingFieldByFieldRecursively(Object actual, Object other,
                                                                                    List<ComparisonDifference> differences,
                                                                                    RecursiveComparisonConfiguration recursiveComparisonConfiguration,
                                                                                    Representation representation) {
    String differencesDescription = join(differences.stream()
                                                    .map(difference -> difference.multiLineDescription(representation))
                                                    .collect(toList())).with(format("%n%n"));
    String recursiveComparisonConfigurationDescription = recursiveComparisonConfiguration.multiLineDescription(representation);
    String differencesCount = differences.size() == 1 ? "difference:%n" : "%s differences:%n";
    // @format:off
    return new ShouldBeEqualByComparingFieldByFieldRecursively("%n" +
                                                               "Expecting actual:%n" +
                                                               "  %s%n" +
                                                               "to be equal to:%n" +
                                                               "  %s%n" +
                                                               "when recursively comparing field by field, but found the following " + differencesCount +
                                                               "%n" +
                                                               escapePercent(differencesDescription) + "%n" +
                                                               "%n"+
                                                               "The recursive comparison was performed with this configuration:%n" +
                                                               recursiveComparisonConfigurationDescription, // don't use %s to avoid AssertJ formatting String with ""
                                                               actual, other, differences.size());
    // @format:on
  }

  private ShouldBeEqualByComparingFieldByFieldRecursively(String message, Object... arguments) {
    super(message, arguments);
  }

  private static String describeDifference(Difference difference, Representation representation) {<FILL_FUNCTION_BODY>}

}

    UnambiguousRepresentation unambiguousRepresentation = new UnambiguousRepresentation(representation, difference.getActual(),
                                                                                        difference.getOther());
    String additionalInfo = difference.getDescription()
                                      .map(desc -> format("%n- reason  : %s", escapePercent(desc)))
                                      .orElse("");
    return format("%nPath to difference: <%s>%n" +
                  "- actual  : %s%n" +
                  "- expected: %s" + additionalInfo,
                  join(difference.getPath()).with("."),
                  escapePercent(unambiguousRepresentation.getActual()),
                  escapePercent(unambiguousRepresentation.getExpected()));
  
<methods>public transient void <init>(java.lang.String, java.lang.Object[]) ,public java.lang.String create(org.assertj.core.description.Description, org.assertj.core.presentation.Representation) ,public java.lang.String create(org.assertj.core.description.Description) ,public java.lang.String create() ,public boolean equals(java.lang.Object) ,public int hashCode() ,public java.lang.String toString() <variables>protected final non-sealed java.lang.Object[] arguments,protected final non-sealed java.lang.String format,org.assertj.core.error.MessageFormatter formatter