@Test(timeout = 10000)
  public void testCompressorNotReturnSameInstance() {
    Compressor comp = CodecPool.getCompressor(codec);
    CodecPool.returnCompressor(comp);
    CodecPool.returnCompressor(comp);
    Set<Compressor> compressors = new HashSet<Compressor>();
    for (int i = 0; i < 10; ++i) {
      compressors.add(CodecPool.getCompressor(codec));
    }
    assertEquals(10, compressors.size());
    for (Compressor compressor : compressors) {
      CodecPool.returnCompressor(compressor);
    }
  }
Along with CodecPool, this is copied from the class of the same name in hadoop-common. Modified
to accommodate changes to HBase's CodecPool.
hbase-common/src/test/java/org/apache/hadoop/hbase/io/compress/TestCodecPool.java