### Question:
FlinkPartitioner implements Partitioner { static int computePartition(Object key, int numPartitions, int maxParallelism) { int group = murmurHash(key.hashCode()) % maxParallelism; return (group * numPartitions) / maxParallelism; }  void configure(Map<String, ?> configs); int partition(String topic, Object key, byte[] keyBytes, Object value, byte[] valueBytes, Cluster cluster); void close();  }### Answer:
@Test public void computePartition() { Random random = new Random(42L); byte[] id = new byte[16]; int maxParallelism = 10393; int numPartitions = 1983; for (int i = 0; i < 40; i++) { random.nextBytes(id); String encoded = Base64.getEncoder().encodeToString(id); int testPartition = FlinkPartitioner.computePartition(encoded, numPartitions, maxParallelism); int flinkPartition = KeyGroupRangeAssignment.assignKeyToParallelOperator(encoded, maxParallelism, numPartitions); assertThat(testPartition, equalTo(flinkPartition)); } }