@Test
  public void testConfig() throws Exception {
    int list_max_result = 10;
    int total_result = 98;
    prepareDb(list_max_result);

    PartitionId partitionId = clusterMap.getWritablePartitionIds(MockClusterMap.DEFAULT_PARTITION_CLASS).get(0);
    String sourceHostName = "localhost";
    int sourceHostPort = 6024;

    // Prepare RepairRequests and insert them to the DB.
    List<RepairRequestRecord> records = new ArrayList<>();
    for (int i = 0; i < total_result; i++) {
      String blobId =
          new BlobId(BlobId.BLOB_ID_V6, BlobId.BlobIdType.NATIVE, (byte) 0, (short) 101, (short) 102, partitionId,
              false, BlobId.BlobDataType.SIMPLE).getID();
      RepairRequestRecord.OperationType operationType = i % 2 == 0 ? TtlUpdateRequest : DeleteRequest;
      long operationTime = System.currentTimeMillis() - random.nextInt(1000);
      short lifeVersion = -1;
      long expirationTime = i % 2 == 0 ? Utils.Infinite_Time : System.currentTimeMillis() + TimeUnit.HOURS.toMillis(1);
      RepairRequestRecord record =
          new RepairRequestRecord(blobId, (int) partitionId.getId(), sourceHostName, sourceHostPort, operationType,
              operationTime, lifeVersion, expirationTime);
      repairRequestsDb.putRepairRequests(record);
      records.add(record);
    }
    assertEquals("Record number is not expected", records.size(), total_result);

    // get records just inserted. Only get list_max_result numbers.
    List<RepairRequestRecord> recordFromStore =
        repairRequestsDb.getRepairRequestsForPartition((int) partitionId.getId());
    assertEquals("Record number is not expected", recordFromStore.size(), list_max_result);
    assertTrue("only read one page", total_result > list_max_result);
  }
Tests the different config of the db operation
@throws Exception
ambry-mysql/src/integration-test/java/com/github/ambry/repair/MysqlRepairRequestsDbTest.java