class OptionalShouldContain extends BasicErrorMessageFactory {

  private static final String EXPECTING_TO_CONTAIN = "%nExpecting actual:%n  %s%nto contain:%n  %s%nbut did not.";
  private static final String EXPECTING_TO_CONTAIN_SAME = "%nExpecting actual:%n  %s%nto contain the instance (i.e. compared with ==):%n  %s%nbut did not.";

  private OptionalShouldContain(String message, Object actual, Object expected) {
    super(message, actual, expected);
  }

  private OptionalShouldContain(Object expected) {
    super("%nExpecting Optional to contain:%n  %s%nbut was empty.", expected);
  }

  /**
   * Indicates that the provided {@link java.util.Optional} does not contain the provided argument.
   *
   * @param optional the {@link java.util.Optional} which contains a value.
   * @param expectedValue the value we expect to be in the provided {@link java.util.Optional}.
   * @param <VALUE> the type of the value contained in the {@link java.util.Optional}.
   * @return a error message factory
   */
  public static <VALUE> OptionalShouldContain shouldContain(Optional<VALUE> optional, VALUE expectedValue) {
    return optional.isPresent()
        ? new OptionalShouldContain(EXPECTING_TO_CONTAIN, optional, expectedValue)
        : shouldContain(expectedValue);
  }

  /**
   * Indicates that the provided {@link java.util.OptionalDouble} does not contain the provided argument.
   *
   * @param optional the {@link java.util.OptionalDouble} which contains a value.
   * @param expectedValue the value we expect to be in the provided {@link java.util.OptionalDouble}.
   * @return a error message factory
   */
  public static OptionalShouldContain shouldContain(OptionalDouble optional, double expectedValue) {
    return optional.isPresent()
        ? new OptionalShouldContain(EXPECTING_TO_CONTAIN, optional, expectedValue)
        : shouldContain(expectedValue);
  }

  /**
   * Indicates that the provided {@link java.util.OptionalInt} does not contain the provided argument.
   *
   * @param optional the {@link java.util.OptionalInt} which contains a value.
   * @param expectedValue the value we expect to be in the provided {@link java.util.OptionalInt}.
   * @return a error message factory
   */
  public static OptionalShouldContain shouldContain(OptionalInt optional, int expectedValue) {
    return optional.isPresent()
        ? new OptionalShouldContain(EXPECTING_TO_CONTAIN, optional, expectedValue)
        : shouldContain(expectedValue);
  }

  /**
   * Indicates that the provided {@link java.util.OptionalLong} does not contain the provided argument.
   *
   * @param optional the {@link java.util.OptionalLong} which contains a value.
   * @param expectedValue the value we expect to be in the provided {@link java.util.OptionalLong}.
   * @return a error message factory
   */
  public static OptionalShouldContain shouldContain(OptionalLong optional, long expectedValue) {
    return optional.isPresent()
        ? new OptionalShouldContain(EXPECTING_TO_CONTAIN, optional, expectedValue)
        : shouldContain(expectedValue);
  }

  /**
   * Indicates that the provided {@link java.util.Optional} does not contain the provided argument (judging by reference
   * equality).
   *
   * @param optional the {@link java.util.Optional} which contains a value.
   * @param expectedValue the value we expect to be in the provided {@link java.util.Optional}.
   * @param <VALUE> the type of the value contained in the {@link java.util.Optional}.
   * @return a error message factory
   */
  public static <VALUE> OptionalShouldContain shouldContainSame(Optional<VALUE> optional, VALUE expectedValue) {<FILL_FUNCTION_BODY>}

  /**
   * Indicates that an {@link java.util.Optional} is empty so it doesn't contain the expected value.
   *
   * @param expectedValue the value we expect to be in an {@link java.util.Optional}.
   * @return a error message factory.
   */
  public static OptionalShouldContain shouldContain(Object expectedValue) {
    return new OptionalShouldContain(expectedValue);
  }
}

    return optional.isPresent()
        ? new OptionalShouldContain(EXPECTING_TO_CONTAIN_SAME, optional, expectedValue)
        : shouldContain(expectedValue);
  
<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