### Question:
MultiRFileOutputFormatter extends FileOutputFormat<BulkIngestKey,Value> { protected static String getCompressionType(Configuration conf) { return conf.get(COMPRESSION_TYPE, "gz"); }  static void setGenerateMapFileRowKeys(Configuration conf, boolean generateMapFileRowKeys); static void setGenerateMapFilePerShardLocation(Configuration conf, boolean generateMapFilePerShardLocation); static void setCompressionType(Configuration conf, String compressionType); static void setCompressionTableBlackList(Configuration conf, Set<String> compressionTableBlackList); static void setFileType(Configuration conf, String type); static void setAccumuloConfiguration(Configuration conf); static void setRFileLimits(Configuration conf, int maxEntries, long maxSize); static void addTableToLocalityGroupConfiguration(Configuration conf, String tableName); @Override synchronized OutputCommitter getOutputCommitter(TaskAttemptContext context); @Override RecordWriter<BulkIngestKey,Value> getRecordWriter(final TaskAttemptContext context); static final String CONFIGURE_LOCALITY_GROUPS; static final String EVENT_PARTITION_COUNT; static final String EDGE_PARTITION_COUNT; static final String INDEX_PARTITION_COUNT; static final String REV_INDEX_PARTITION_COUNT; static final String LOCATION_PARTITION_COUNT; static final String CONFIGURED_TABLE_NAMES; }### Answer:
@Test public void testGetCompressionTypeWithoutSetting() { MultiRFileOutputFormatterTest.logger.info("testSetCompressionTypeWithBadType called..."); try { String expected = "gz"; Assert.assertEquals("MultiRFileOutputFormatter.setCompressionType failed to set compression type", expected, MultiRFileOutputFormatter.getCompressionType(createMockConfiguration())); } finally { MultiRFileOutputFormatterTest.logger.info("testSetCompressionTypeWithBadType completed."); } }
@Test public void testGetCompressionType() { MultiRFileOutputFormatterTest.logger.info("testGetCompressionType called..."); try { Configuration conf = createMockConfiguration(); String expected = "snappy"; MultiRFileOutputFormatter.setCompressionType(conf, expected); Assert.assertEquals("MultiRFileOutputFormatter.setCompressionType failed to set compression type", expected, MultiRFileOutputFormatter.getCompressionType(conf)); expected = "lzo"; MultiRFileOutputFormatter.setCompressionType(conf, expected); Assert.assertEquals("MultiRFileOutputFormatter.setCompressionType failed to set compression type", expected, MultiRFileOutputFormatter.getCompressionType(conf)); expected = "gz"; MultiRFileOutputFormatter.setCompressionType(conf, expected); Assert.assertEquals("MultiRFileOutputFormatter.setCompressionType failed to set compression type", expected, MultiRFileOutputFormatter.getCompressionType(conf)); expected = "none"; MultiRFileOutputFormatter.setCompressionType(conf, expected); Assert.assertEquals("MultiRFileOutputFormatter.setCompressionType failed to set compression type", expected, MultiRFileOutputFormatter.getCompressionType(conf)); } finally { MultiRFileOutputFormatterTest.logger.info("testGetCompressionType completed."); } }