public final @NotNull S hasSize(int expected) {
    isNotNull();
    int size = actualGroupSize();
    if (size == expected) {
      return myself();
    }
    failIfCustomMessageIsSet();
    throw failure(format("expected size:<%s> but was:<%s> for <%s>", expected, size, actual));
  }
public final @NotNull S hasSize(int expected) {
    isNotNull();
    int size = actualGroupSize();
    if (size == expected) {
      return myself();
    }
    failIfCustomMessageIsSet();
    throw failure(format("expected size:<%s> but was:<%s> for <%s>", expected, size, actual));
  }
public final @ NotNull S hasSize ( int expected ) { isNotNull ( ) ; int size = actualGroupSize ( ) ; if ( size == expected ) { return myself ( ) ; } failIfCustomMessageIsSet ( ) ; throw failure ( format ( "expected size:<%s> but was:<%s> for <%s>" , expected , size , actual ) ) ; }
Verifies that the number of values in the actual group is equal to the given one.

@param expected the expected number of values in the actual group.
@return this assertion object.
@throws AssertionError if the number of values of the actual group is not equal to the given one.
Verifies that the number of values in the actual group is equal to the given one .