src/main/java/org/fest/assertions/ImageAssert.java
public @NotNull ImageAssert isEqualTo(@Nullable BufferedImage expected, @NotNull Threshold threshold) {
    checkNotNull(threshold);
    if (areEqual(actual, expected)) {
      return this;
    }
    failIfNull(expected);
    failIfNotEqual(sizeOf(actual), sizeOf(expected));
    failIfNotEqualColor(checkNotNull(expected), threshold);
    return this;
  }
public @NotNull ImageAssert isEqualTo(@Nullable BufferedImage expected, @NotNull Threshold threshold) {
    checkNotNull(threshold);
    if (areEqual(actual, expected)) {
      return this;
    }
    failIfNull(expected);
    failIfNotEqual(sizeOf(actual), sizeOf(expected));
    failIfNotEqualColor(checkNotNull(expected), threshold);
    return this;
  }
Verifies that the actual image is equal to the given one. Two images are equal if:
<ol>
<li>they have the same size</li>
<li>the difference between the RGB values of the color of each pixel is less than or equal to the given threshold</li>
</ol>

@param expected  the given image to compare the actual image to.
@param threshold the threshold to use to decide if the color of two pixels are similar: two pixels that are
identical to the human eye may still have slightly different color values. For example, by using a
threshold of 1 we can indicate that a blue value of 60 is similar to a blue value of 61.
@return this assertion object.
@throws NullPointerException if {@code threshold} is {@code null}.
@throws AssertionError       if the actual image is not equal to the given one.
@since 1.1