class ShouldBeInstance extends BasicErrorMessageFactory {

  /**
   * Creates a new <code>{@link ShouldBeInstance}</code>.
   *
   * @param object the object value in the failed assertion.
   * @param type the type {@code object} is \nExpecting:\n to belong to.
   * @return the created {@code ErrorMessageFactory}.
   */
  public static ErrorMessageFactory shouldBeInstance(Object object, Class<?> type) {<FILL_FUNCTION_BODY>}

  /**
   * Creates a new <code>{@link ShouldBeInstance}</code> when object we want to check type is null.
   *
   * @param objectDescription the description of the null object we wanted to check type.
   * @param type the \nExpecting:\n type.
   * @return the created {@code ErrorMessageFactory}.
   */
  public static ErrorMessageFactory shouldBeInstanceButWasNull(String objectDescription, Class<?> type) {
    return new ShouldBeInstance(objectDescription, type);
  }

  private ShouldBeInstance(Object object, Class<?> type) {
    super("%n" +
          "Expecting actual:%n" +
          "  %s%n" +
          "to be an instance of:%n" +
          "  %s%n" +
          "but was instance of:%n" +
          "  %s",
          object, type, object.getClass());
  }

  private ShouldBeInstance(Throwable throwable, Class<?> type) {
    super("%n" +
          "Expecting actual throwable to be an instance of:%n" +
          "  %s%n" +
          "but was:%n" +
          "  %s",
          type, throwable);
  }

  private ShouldBeInstance(String objectDescription, Class<?> type) {
    super("%n" +
          "Expecting object:%n" +
          "  %s%n" +
          "to be an instance of:%n" +
          "  <%s>%n" +
          "but was null",
          objectDescription, type);
  }
}

    return object instanceof Throwable ? new ShouldBeInstance((Throwable) object, type) : new ShouldBeInstance(object, type);
  
<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