### Question:
ArrayCombinationsFunction { @VisibleForTesting static int combinationCount(int arrayLength, int combinationLength) { try { int combinations = 1; for (int i = 1; i <= combinationLength; i++) { combinations = multiplyExact(combinations, arrayLength - combinationLength + i) / i; } return combinations; } catch (ArithmeticException e) { throw new PrestoException(INVALID_FUNCTION_ARGUMENT, format("Number of combinations too large for array of size %s and combination length %s", arrayLength, combinationLength)); } } private  ArrayCombinationsFunction(); @TypeParameter("T") @SqlType("array(array(T))") static Block combinations(
            @TypeParameter("T") Type elementType,
            @SqlType("array(T)") Block array,
            @SqlType(INTEGER) long n);  }### Answer:
@Test public void testCombinationCount() { for (int n = 0; n < 5; n++) { for (int k = 0; k <= n; k++) { assertEquals(combinationCount(n, k), factorial(n) / factorial(n - k) / factorial(k)); } } assertEquals(combinationCount(42, 7), 26978328); assertEquals(combinationCount(100, 4), 3921225); }