### Question:
Container implements Iterable<Character>, Cloneable, Externalizable,
        WordStorage<Container> { public String getContainerName() { if (this instanceof BitmapContainer) { return ContainerNames[0]; } else if (this instanceof ArrayContainer) { return ContainerNames[1]; } else { return ContainerNames[2]; } }  static Container rangeOfOnes(final int start, final int last); abstract Container add(int begin, int end); abstract Container add(char x); abstract Container and(ArrayContainer x); abstract Container and(BitmapContainer x); Container and(Container x); abstract Container and(RunContainer x); int andCardinality(Container x); int xorCardinality(Container other); abstract Container andNot(ArrayContainer x); abstract Container andNot(BitmapContainer x); Container andNot(Container x); abstract Container andNot(RunContainer x); Container orNot(Container x, int endOfRange); abstract void clear(); @Override abstract Container clone(); abstract boolean isEmpty(); abstract boolean isFull(); abstract boolean contains(char x); abstract boolean contains(int minimum, int supremum); boolean contains(Container subset); abstract void deserialize(DataInput in); abstract void fillLeastSignificant16bits(int[] x, int i, int mask); abstract Container flip(char x); abstract int getArraySizeInBytes(); abstract int getCardinality(); String getContainerName(); abstract void forEach(char msb, IntConsumer ic); abstract CharIterator getReverseCharIterator(); abstract PeekableCharIterator getCharIterator(); abstract PeekableCharRankIterator getCharRankIterator(); abstract ContainerBatchIterator getBatchIterator(); abstract int getSizeInBytes(); abstract Container iadd(int begin, int end); abstract Container iand(ArrayContainer x); abstract Container iand(BitmapContainer x); Container iand(Container x); abstract Container iand(RunContainer x); abstract Container iandNot(ArrayContainer x); abstract Container iandNot(BitmapContainer x); Container iandNot(Container x); abstract Container iandNot(RunContainer x); Container iorNot(Container x, int endOfRange); abstract Container inot(int rangeStart, int rangeEnd); abstract boolean intersects(ArrayContainer x); abstract boolean intersects(BitmapContainer x); boolean intersects(Container x); abstract boolean intersects(RunContainer x); abstract boolean intersects(int minimum, int supremum); abstract Container ior(ArrayContainer x); abstract Container ior(BitmapContainer x); Container ior(Container x); abstract Container ior(RunContainer x); abstract Container iremove(int begin, int end); abstract Container ixor(ArrayContainer x); abstract Container ixor(BitmapContainer x); Container ixor(Container x); abstract Container ixor(RunContainer x); Container lazyIOR(Container x); Container lazyOR(Container x); abstract Container limit(int maxcardinality); abstract Container not(int rangeStart, int rangeEnd); abstract Container or(ArrayContainer x); abstract Container or(BitmapContainer x); Container or(Container x); abstract Container or(RunContainer x); abstract int rank(char lowbits); abstract Container remove(int begin, int end); abstract Container remove(char x); abstract Container repairAfterLazy(); abstract Container runOptimize(); abstract char select(int j); abstract void serialize(DataOutput out); abstract int serializedSizeInBytes(); abstract MappeableContainer toMappeableContainer(); abstract void trim(); abstract void writeArray(DataOutput out); abstract void writeArray(ByteBuffer buffer); abstract Container xor(ArrayContainer x); abstract Container xor(BitmapContainer x); Container xor(Container x); abstract Container xor(RunContainer x); abstract BitmapContainer toBitmapContainer(); abstract int nextValue(char fromValue); abstract int previousValue(char fromValue); abstract int nextAbsentValue(char fromValue); abstract int previousAbsentValue(char fromValue); abstract int first(); abstract int last(); static final String[] ContainerNames; }### Answer:
@Test public void testNames() { assertEquals(new BitmapContainer().getContainerName(), Container.ContainerNames[0]); assertEquals(new ArrayContainer().getContainerName(), Container.ContainerNames[1]); assertEquals(new RunContainer().getContainerName(), Container.ContainerNames[2]); }