### Question:
TypedSet { public static TypedSet createEqualityTypedSet( Type elementType, BlockPositionEqual elementEqualOperator, BlockPositionHashCode elementHashCodeOperator, int expectedSize, String functionName) { return createEqualityTypedSet( elementType, elementEqualOperator, elementHashCodeOperator, elementType.createBlockBuilder(null, expectedSize), expectedSize, functionName, false); } TypedSet(
            Type elementType,
            BlockPositionEqual elementEqualOperator,
            BlockPositionIsDistinctFrom elementDistinctFromOperator,
            BlockPositionHashCode elementHashCodeOperator,
            BlockBuilder blockBuilder,
            int expectedSize,
            String functionName,
            boolean unboundedMemory); static TypedSet createEqualityTypedSet(
            Type elementType,
            BlockPositionEqual elementEqualOperator,
            BlockPositionHashCode elementHashCodeOperator,
            int expectedSize,
            String functionName); static TypedSet createEqualityTypedSet(
            Type elementType,
            BlockPositionEqual elementEqualOperator,
            BlockPositionHashCode elementHashCodeOperator,
            BlockBuilder blockBuilder,
            int expectedSize,
            String functionName,
            boolean unboundedMemory); static TypedSet createDistinctTypedSet(
            Type elementType,
            BlockPositionIsDistinctFrom elementDistinctFromOperator,
            BlockPositionHashCode elementHashCodeOperator,
            int expectedSize,
            String functionName); static TypedSet createDistinctTypedSet(
            Type elementType,
            BlockPositionIsDistinctFrom elementDistinctFromOperator,
            BlockPositionHashCode elementHashCodeOperator,
            BlockBuilder blockBuilder,
            int expectedSize,
            String functionName); long getRetainedSizeInBytes(); boolean contains(Block block, int position); void add(Block block, int position); int size(); int positionOf(Block block, int position); @VisibleForTesting
    static final DataSize MAX_FUNCTION_MEMORY; }### Answer:
@Test public void testConstructor() { for (int i = -2; i <= -1; i++) { try { createEqualityTypedSet(BIGINT, i); fail("Should throw exception if expectedSize < 0"); } catch (IllegalArgumentException e) { } } try { TypedSet.createEqualityTypedSet(null, null, null, 1, FUNCTION_NAME); fail("Should throw exception if type is null"); } catch (NullPointerException | IllegalArgumentException e) { } }