code: public @NotNull ImageAssert hasSize(@NotNull Dimension expected) {
      isNotNull();
      checkNotNull(expected);
      Dimension actualDimension = new Dimension(actual.getWidth(), actual.getHeight());
      if (areEqual(actualDimension, expected)) {
        return this;
      }
      failWithMessage(customErrorMessage());
      throw comparisonFailed(rawDescription(), new DimensionFormatter(actualDimension), new DimensionFormatter(expected));
    }
docs: Verifies that the size of the actual image is equal to the given one.
  
  @param expected the expected size of the actual image.
  @return this assertion object.
  @throws AssertionError       if the actual image is {@code null}.
  @throws NullPointerException if the given size is {@code null}.
  @throws AssertionError       if the size of the actual image is not equal to the given one.