### Question:
TypedSet { public int size() { return size; } 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 testBigintSimpleTypedSet() { List<Integer> expectedSetSizes = ImmutableList.of(1, 10, 100, 1000); List<Block> longBlocks = ImmutableList.of( createEmptyLongsBlock(), createLongsBlock(1L), createLongsBlock(1L, 2L, 3L), createLongsBlock(1L, 2L, 3L, 1L, 2L, 3L), createLongsBlock(1L, null, 3L), createLongsBlock(null, null, null), createLongSequenceBlock(0, 100), createLongSequenceBlock(-100, 100), createLongsBlock(nCopies(1, null)), createLongsBlock(nCopies(100, null)), createLongsBlock(nCopies(expectedSetSizes.get(expectedSetSizes.size() - 1) * 2, null)), createLongsBlock(nCopies(expectedSetSizes.get(expectedSetSizes.size() - 1) * 2, 0L))); for (int expectedSetSize : expectedSetSizes) { for (Block block : longBlocks) { testBigint(block, expectedSetSize); } } }