private Region<String, String> createServerRegion(String name, DataPolicy dataPolicy,
      Compressor compressor) throws IOException {
    Region<String, String> region = getCache().<String, String>createRegionFactory()
        .setDataPolicy(dataPolicy).setCloningEnabled(true).setCompressor(compressor).create(name);
    CacheServer server = getCache().addCacheServer();
    server.setPort(0);
    server.start();

    return region;
  }
Creates a compressed region and adds a cache server to a peer.

@param name the region name.
@param dataPolicy the type of peer.
@param compressor a compressor
@return the newly created region.
@throws IOException a problem occurred while created the cache server.
geode-core/src/distributedTest/java/org/apache/geode/internal/compression/CompressionRegionConfigDUnitTest.java