class WritableAssertionInfo implements AssertionInfo {

  private static final String EMPTY_STRING = "";
  private Supplier<String> overridingErrorMessageSupplier;
  private String overridingErrorMessage;
  private Description description;
  private Representation representation;

  public WritableAssertionInfo(Representation customRepresentation) {
    useRepresentation(customRepresentation == null ? CONFIGURATION_PROVIDER.representation() : customRepresentation);
  }

  public WritableAssertionInfo() {
    useRepresentation(CONFIGURATION_PROVIDER.representation());
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public String overridingErrorMessage() {
    // at this point we can have only one of overridingErrorMessageSupplier or overridingErrorMessage
    return overridingErrorMessageSupplier != null ? overridingErrorMessageSupplier.get() : overridingErrorMessage;
  }

  /**
   * Sets the message that will replace the default message of an assertion failure.
   *
   * @param newErrorMessage the new message. It can be {@code null}.
   * @throws IllegalStateException if the message has already been overridden with {@link #overridingErrorMessage(Supplier)}.
   */
  public void overridingErrorMessage(String newErrorMessage) {
    checkState(overridingErrorMessageSupplier == null,
               "An error message has already been set with overridingErrorMessage(Supplier<String> supplier)");
    overridingErrorMessage = newErrorMessage;
  }

  /**
   * Sets the lazy fail message that will replace the default message of an assertion failure by using a supplier.
   *
   * @param supplier the new message by a supplier. It can be {@code null}.
   * @throws IllegalStateException if the message has already been overridden with {@link #overridingErrorMessage(String)}.
   */
  public void overridingErrorMessage(Supplier<String> supplier) {<FILL_FUNCTION_BODY>}

  /**
   * {@inheritDoc}
   */
  @Override
  public Description description() {
    return description;
  }

  /**
   * Returns the text of this object's description, it is an empty String if no description was set.
   *
   * @return the text of this object's description.
   */
  public String descriptionText() {
    return description == null ? EMPTY_STRING : description.value();
  }

  /**
   * Returns whether the text of this object's description was set.
   *
   * @return whether the text of this object's description was set.
   */
  public boolean hasDescription() {
    return description != null && !isNullOrEmpty(description.value());
  }

  /**
   * Sets the description of an assertion, if given null an empty {@link Description} is set.
   *
   * @param newDescription the new description.
   * @param args           if {@code newDescription} is a format String, {@code args} is argument of {@link String#format(String, Object...)}
   * @see #description(Description)
   */
  public void description(String newDescription, Object... args) {
    description = new TextDescription(newDescription, args);
  }

  /**
   * Sets the description of an assertion, if given null an empty {@link Description} is set.
   * <p>
   * To remove or clear the description, pass a <code>{@link EmptyTextDescription}</code> as
   * argument.
   *
   * @param newDescription the new description.
   */
  public void description(Description newDescription) {
    description = Description.emptyIfNull(newDescription);
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public Representation representation() {
    return representation;
  }

  public void useHexadecimalRepresentation() {
    representation = new HexadecimalRepresentation();
  }

  public void useUnicodeRepresentation() {
    representation = new UnicodeRepresentation();
  }

  public void useBinaryRepresentation() {
    representation = new BinaryRepresentation();
  }

  public void useRepresentation(Representation newRepresentation) {
    requireNonNull(newRepresentation, "The representation to use should not be null.");
    representation = newRepresentation;
  }

  public static String mostRelevantDescriptionIn(WritableAssertionInfo info, String newDescription) {
    return info.hasDescription() ? info.descriptionText() : newDescription;
  }

  /**
   * {@inheritDoc}
   */
  @Override
  public String toString() {
    String format = "%s[overridingErrorMessage=%s, description=%s, representation=%s]";
    return format(format, getClass().getSimpleName(), quote(overridingErrorMessage()), quote(descriptionText()),
                  quote(representation()));
  }

}

    checkState(overridingErrorMessage == null,
               "An error message has already been set with overridingErrorMessage(String newErrorMessage)");
    overridingErrorMessageSupplier = supplier;
  
<no_super_class>