code: public static void atSize(final Collection<?> collection, final int size, final String collectionName) {
          notNull(collection, collectionName);
          notNegative(size, "size");
  
          if (collection.size() != size) {
              throw new IllegalArgumentException("expecting " + maskNullArgument(collectionName) + " to be of size " + size + ".");
          }
      }
docs: Checks that a collection is of a given size
  @param collection the collection to check
  @param size the size of the collection
  @param collectionName the name of the collection
  @throws IllegalArgumentException if collection is null or if the collection size is not as expected