### Question:
DelegatingPartitioner extends Partitioner<BulkIngestKey,Value> implements Configurable { @Override public void setConf(Configuration conf) { this.conf = conf; this.partitionerCache = new PartitionerCache(conf); try { createDelegatesForTables(); } catch (ClassNotFoundException e) { log.error(e); throw new RuntimeException(e); } } DelegatingPartitioner();  DelegatingPartitioner(Configuration configuration); static void configurePartitioner(Job job, Configuration conf, String[] tableNames); @Override // delegates partitioning int getPartition(BulkIngestKey key, Value value, int numPartitions); @Override Configuration getConf(); @Override void setConf(Configuration conf);  }### Answer:
@Test(expected = Exception.class) public void testThrowsExceptionOnInconsistentConfig() throws Exception { conf.set(DelegatingPartitioner.TABLE_NAMES_WITH_CUSTOM_PARTITIONERS, "table1,table2"); conf.set(PartitionerCache.PREFIX_DEDICATED_PARTITIONER + "table1", AlwaysReturnOne.class.getName()); manager.setConf(conf); }
@Test(expected = IllegalArgumentException.class) public void testDoesntLikeEmptyList() throws Exception { conf.set(DelegatingPartitioner.TABLE_NAMES_WITH_CUSTOM_PARTITIONERS, ""); manager.setConf(conf); }