code: public static void atLength(final Object[] array, final int length, final String arrayName) {
          notNull(array, arrayName);
          notNegative(length, "length");
  
          if (array.length != length) {
              throw new IllegalArgumentException("expecting " + maskNullArgument(arrayName) + " to be of length " + length + ".");
          }
      }
docs: Checks that an array is of a given length
  @param array the array
  @param length the desired length of the array
  @param arrayName the name of the array
  @throws IllegalArgumentException if the array is null or if the array's length is not as expected