### Question:
LimitedKeyPartitioner extends Partitioner<BulkIngestKey,Value> implements Configurable, DelegatePartitioner { @Override public int getPartition(BulkIngestKey bKey, Value value, int numPartitions) { int partitioner = getKeyHashcode(bKey) & Integer.MAX_VALUE; return partitionLimiter.limit(numPartitions, partitioner); }  @Override int getPartition(BulkIngestKey bKey, Value value, int numPartitions); @Override Configuration getConf(); @Override void setConf(Configuration conf); @Override void configureWithPrefix(String prefix); @Override int getNumPartitions(); @Override void initializeJob(Job job);  }### Answer:
@Test(expected = Exception.class) public void testNoMaxPartitions() { LimitedKeyPartitioner partitioner = new LimitedKeyPartitioner(); partitioner.getPartition(createKeyFor(""), new Value(), NUM_REDUCERS); }