  @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));
    }
  }