src/main/java/org/fest/assertions/internal/Sets.java
public void assertHasSize(Description description, Set<?> actual, int expectedSize) {
    assertNotNull(description, actual);
    if (expectedSize < 0) {
      throw failures.failure(description, shouldNotBeLessThan(expectedSize, 0));
    }
    int sizeOfActual = actual.size();
    if (sizeOfActual != expectedSize) {
      throw failures.failure(description, shouldHaveSize(actual, sizeOfActual, expectedSize));
    }
  }
public void assertHasSize(Description description, Set<?> actual, int expectedSize) {
    assertNotNull(description, actual);
    if (expectedSize < 0) {
      throw failures.failure(description, shouldNotBeLessThan(expectedSize, 0));
    }
    int sizeOfActual = actual.size();
    if (sizeOfActual != expectedSize) {
      throw failures.failure(description, shouldHaveSize(actual, sizeOfActual, expectedSize));
    }
  }
Asserts that the number of values in the given {@code Set} is equal to the expected one.

@param description contains information about the assertion.
@param actual the given {@code Set}.
@param expectedSize the expected size of {@code actual}.
@throws AssertionError if the given {@code Set} is {@code null}.
@throws AssertionError if the number of values in the given {@code Set} is different than the expected one.