### Question:
TabletLocationHashPartitioner extends Partitioner<BulkIngestKey,Value> implements Configurable, DelegatePartitioner { @Override public void setConf(Configuration conf) { this.conf = conf; }  @Override synchronized int getPartition(BulkIngestKey key, Value value, int numReduceTasks); @Override Configuration getConf(); @Override void setConf(Configuration conf); @Override void configureWithPrefix(String prefix); @Override int getNumPartitions(); @Override void initializeJob(Job job);  }### Answer:
@Test public void testLocationHashPartitioner() throws Exception { conf.setInt(ShardIdFactory.NUM_SHARDS, SHARDS_PER_DAY); new TestShardGenerator(conf, NUM_DAYS, SHARDS_PER_DAY, TOTAL_TSERVERS, "shard"); TabletLocationHashPartitioner partitionerTwo = new TabletLocationHashPartitioner(); partitionerTwo.setConf(conf); BalancedShardPartitionerTest.assertExpectedCollisions(partitionerTwo, 0, MAX_EXPECTED_COLLISIONS); BalancedShardPartitionerTest.assertExpectedCollisions(partitionerTwo, 1, MAX_EXPECTED_COLLISIONS); BalancedShardPartitionerTest.assertExpectedCollisions(partitionerTwo, 2, MAX_EXPECTED_COLLISIONS); BalancedShardPartitionerTest.assertExpectedCollisions(partitionerTwo, 3, MAX_EXPECTED_COLLISIONS); BalancedShardPartitionerTest.assertExpectedCollisions(partitionerTwo, 4, MAX_EXPECTED_COLLISIONS); BalancedShardPartitionerTest.assertExpectedCollisions(partitionerTwo, 5, MAX_EXPECTED_COLLISIONS); BalancedShardPartitionerTest.assertExpectedCollisions(partitionerTwo, 20, MAX_EXPECTED_COLLISIONS); BalancedShardPartitionerTest.assertExpectedCollisions(partitionerTwo, 100, MAX_EXPECTED_COLLISIONS); }