### Question:
PrimitiveLongCollections { public static MutableLongSet mergeToSet( LongIterable a, LongIterable b ) { final MutableLongSet set = new LongHashSet( a.size() + b.size() ); set.addAll( a ); set.addAll( b ); return set; } private  PrimitiveLongCollections(); static LongIterator iterator( final long... items ); static LongIterator concat( LongIterator... longIterators ); static LongIterator concat( Iterable<LongIterator> primitiveLongIterators ); static LongIterator filter( LongIterator source, final LongPredicate filter ); static LongIterator range( long start, long end ); static int indexOf( LongIterator iterator, long item ); static MutableLongSet asSet( Collection<Long> collection ); static MutableLongSet asSet( LongIterator iterator ); static int count( LongIterator iterator ); static long[] asArray( LongIterator iterator ); static long[] asArray( Iterator<Long> iterator ); static LongIterator toPrimitiveIterator( final Iterator<Long> iterator ); static Iterator<T> map( final LongFunction<T> mapFunction, final LongIterator source ); static List<Long> asList( LongIterator iterator ); static Iterator<Long> toIterator( final LongIterator primIterator ); static PrimitiveLongResourceIterator resourceIterator( final LongIterator iterator,
            final Resource resource ); static Set<Long> toSet( LongSet set ); static Set<Long> toSet( LongIterator iterator ); static long[] deduplicate( long[] values ); static MutableLongSet mergeToSet( LongIterable a, LongIterable b ); static final long[] EMPTY_LONG_ARRAY; }### Answer:
@Test void mergeLongIterableToSet() { assertThat( mergeToSet( new LongHashSet(), new LongHashSet() ), equalTo( new LongHashSet() ) ); assertThat( mergeToSet( newSetWith( 1, 2, 3 ), new LongHashSet() ), equalTo( newSetWith( 1, 2, 3 ) ) ); assertThat( mergeToSet( newSetWith( 1, 2, 3 ), newSetWith( 1, 2, 3, 4, 5, 6 ) ), equalTo( newSetWith( 1, 2, 3, 4, 5, 6 ) ) ); assertThat( mergeToSet( newSetWith( 1, 2, 3 ), newSetWith( 4, 5, 6 ) ), equalTo( newSetWith( 1, 2, 3, 4, 5, 6 ) ) ); }