private static Message getMessage(Optional<Integer> forcedParamIndex) {

    i = (i + 1) % 3;

    Message message = null;

    switch (forcedParamIndex.orElse(i)) {

      case 0: {
        message = ClientProtos.ScanRequest.newBuilder()
          .setRegion(
            HBaseProtos.RegionSpecifier.newBuilder().setValue(ByteString.copyFromUtf8("region1"))
              .setType(HBaseProtos.RegionSpecifier.RegionSpecifierType.REGION_NAME).build())
          .build();
        break;
      }
      case 1: {
        message = ClientProtos.MutateRequest.newBuilder()
          .setRegion(
            HBaseProtos.RegionSpecifier.newBuilder().setValue(ByteString.copyFromUtf8("region2"))
              .setType(HBaseProtos.RegionSpecifier.RegionSpecifierType.REGION_NAME))
          .setMutation(ClientProtos.MutationProto.newBuilder()
            .setRow(ByteString.copyFromUtf8("row123")).build())
          .build();
        break;
      }
      case 2: {
        message = ClientProtos.GetRequest.newBuilder()
          .setRegion(
            HBaseProtos.RegionSpecifier.newBuilder().setValue(ByteString.copyFromUtf8("region2"))
              .setType(HBaseProtos.RegionSpecifier.RegionSpecifierType.REGION_NAME))
          .setGet(ClientProtos.Get.newBuilder().setRow(ByteString.copyFromUtf8("row123")).build())
          .build();
        break;
      }
      default:
        throw new RuntimeException("Not supposed to get here?");
    }

    return message;

  }
confirm that for a ringbuffer of slow logs, payload on given index of buffer has expected
elements
@param i               index of ringbuffer logs
@param j               data value that was put on index i
@param slowLogPayloads list of payload retrieved from {@link NamedQueueRecorder}
@return if actual values are as per expectations
hbase-server/src/test/java/org/apache/hadoop/hbase/namequeues/TestNamedQueueRecorder.java