public void validate() {
      assertEquals(
          String.format("Should be %d distinct elements in total", TOTAL_NUM_RECORDS),
          TOTAL_NUM_RECORDS,
          consumedValues.size());
      assertEquals(
          String.format("Should be %d elements in total", TOTAL_NUM_RECORDS),
          TOTAL_NUM_RECORDS,
          count);
      assertEquals("The min value should be 0", 0, min);
      assertEquals(
          "The max value should be " + (TOTAL_NUM_RECORDS - 1), TOTAL_NUM_RECORDS - 1, max);
    }
A source output that validates the output.
amoro-format-mixed/amoro-mixed-flink/amoro-mixed-flink-common/src/test/java/org/apache/amoro/flink/read/hidden/kafka/TestKafkaSourceReader.java