class ShouldBeEqualWithinPercentage extends BasicErrorMessageFactory {

  /**
   * Creates a new <code>{@link org.assertj.core.error.ShouldBeEqualWithinPercentage}</code>.
   *
   * @param <T> the type of values to compare.
   * @param actual the actual value in the failed assertion.
   * @param expected the expected value in the failed assertion.
   * @param percentage the given positive percentage.
   * @param difference the effective difference between actual and expected.
   * @return the created {@code ErrorMessageFactory}.
   */
  public static <T extends Number> ErrorMessageFactory shouldBeEqualWithinPercentage(T actual, T expected,
                                                                                     Percentage percentage,
                                                                                     T difference) {<FILL_FUNCTION_BODY>}

  private ShouldBeEqualWithinPercentage(Number actual, Number expected, Percentage percentage,
                                        double expectedPercentage) {
    super("%nExpecting actual:%n" +
          "  %s%n" +
          "to be close to:%n" +
          "  %s%n" +
          "by less than %s but difference was %s%%.%n" +
          "(a difference of exactly %s being considered valid)",
          actual, expected, percentage, expectedPercentage, percentage);
  }
}

    double expectedPercentage = difference.doubleValue() / expected.doubleValue() * 100d;
    return new ShouldBeEqualWithinPercentage(actual, expected, percentage, expectedPercentage);
  
<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