### Question:
ImmutableBitSet implements Iterable<Integer>, Serializable, Comparable<ImmutableBitSet> { public Iterable<ImmutableBitSet> powerSet() { List<List<ImmutableBitSet>> singletons = new ArrayList<>(); for ( int bit : this ) { singletons.add( ImmutableList.of( ImmutableBitSet.of(), ImmutableBitSet.of( bit ) ) ); } return Iterables.transform( Linq4j.product( singletons ), ImmutableBitSet::union ); } private  ImmutableBitSet( long[] words ); static ImmutableBitSet of(); static ImmutableBitSet of( int... bits ); static ImmutableBitSet of( Iterable<Integer> bits ); static ImmutableBitSet of( ImmutableIntList bits ); static ImmutableBitSet valueOf( long... longs ); static ImmutableBitSet valueOf( LongBuffer longs ); static ImmutableBitSet fromBitSet( BitSet input ); static ImmutableBitSet range( int fromIndex, int toIndex ); static ImmutableBitSet range( int toIndex ); Iterable<ImmutableBitSet> powerSet(); boolean get( int bitIndex ); ImmutableBitSet get( int fromIndex, int toIndex ); String toString(); boolean intersects( ImmutableBitSet set ); int cardinality(); int hashCode(); int size(); boolean equals( Object obj ); @Override int compareTo( @Nonnull ImmutableBitSet o ); int nextSetBit( int fromIndex ); int nextClearBit( int fromIndex ); int previousClearBit( int fromIndex ); @Override Iterator<Integer> iterator(); List<Integer> toList(); List<Integer> asList(); Set<Integer> asSet(); int[] toArray(); long[] toLongArray(); ImmutableBitSet union( BitSet other ); ImmutableBitSet union( ImmutableBitSet other ); static ImmutableBitSet union( Iterable<? extends ImmutableBitSet> sets ); ImmutableBitSet except( ImmutableBitSet that ); ImmutableBitSet intersect( ImmutableBitSet that ); boolean contains( ImmutableBitSet set1 ); int indexOf( int bit ); static SortedMap<Integer, ImmutableBitSet> closure( SortedMap<Integer, ImmutableBitSet> equivalence ); int length(); boolean isEmpty(); static Builder builder(); Builder rebuild(); int nth( int n ); ImmutableBitSet set( int i ); ImmutableBitSet set( int i, boolean b ); ImmutableBitSet setIf( int bit, boolean condition ); ImmutableBitSet clear( int i ); ImmutableBitSet clearIf( int i, boolean condition ); BitSet toBitSet(); ImmutableBitSet permute( Map<Integer, Integer> map ); static Iterable<ImmutableBitSet> permute( Iterable<ImmutableBitSet> bitSets, final Map<Integer, Integer> map ); ImmutableBitSet shift( int offset ); static final Comparator<ImmutableBitSet> COMPARATOR; static final Ordering<ImmutableBitSet> ORDERING; }### Answer:
@Test public void testPowerSet() { final ImmutableBitSet empty = ImmutableBitSet.of(); assertThat( Iterables.size( empty.powerSet() ), equalTo( 1 ) ); assertThat( empty.powerSet().toString(), equalTo( "[{}]" ) ); final ImmutableBitSet single = ImmutableBitSet.of( 2 ); assertThat( Iterables.size( single.powerSet() ), equalTo( 2 ) ); assertThat( single.powerSet().toString(), equalTo( "[{}, {2}]" ) ); final ImmutableBitSet two = ImmutableBitSet.of( 2, 10 ); assertThat( Iterables.size( two.powerSet() ), equalTo( 4 ) ); assertThat( two.powerSet().toString(), equalTo( "[{}, {10}, {2}, {2, 10}]" ) ); final ImmutableBitSet seventeen = ImmutableBitSet.range( 3, 20 ); assertThat( Iterables.size( seventeen.powerSet() ), equalTo( 131072 ) ); }