EventStreamInfo runSelectObjectContentMethodForCSV() {
        final String queryExpression = "select * from s3object c where c.region in ('Asia', 'Americas', 'Africa')";
        final String fileType = FILE_CSV;

        InputSerialization inputSerialization = InputSerialization.builder()
                .csv(CSVInput.builder().fileHeaderInfo(FileHeaderInfo.USE).build())
                .compressionType(CompressionType.NONE)
                .build();

        OutputSerialization outputSerialization = OutputSerialization.builder()
                .csv(CSVOutput.builder().build())
                .build();

        SelectObjectContentRequest select = SelectObjectContentRequest.builder()
                .bucket(BUCKET_NAME)
                .key(FILE_CSV)
                .expression(queryExpression)
                .expressionType(ExpressionType.SQL)
                .inputSerialization(inputSerialization)
                .outputSerialization(outputSerialization)
                .build();

        EventStreamInfo eventStreamInfo = new EventStreamInfo();

        s3AsyncClient.selectObjectContent(select, buildResponseHandler(eventStreamInfo)).join();
        long recordCount = eventStreamInfo.getRecords().stream().mapToInt(record ->
                record.split("\n").length
        ).sum();
        logger.info("Total records {}: {}", fileType, recordCount);
        logger.info("Visitor onRecords for fileType {} called {} times", fileType, eventStreamInfo.getCountOnRecordsCalled());
        logger.info("Visitor onStats for fileType {}, {}", fileType, eventStreamInfo.getStats());
        logger.info("Visitor onContinuations for fileType {}, {}", fileType, eventStreamInfo.getCountContinuationEvents());
        return eventStreamInfo;
    }
@Test
    void selectCSVObjectContentTest() {
        EventStreamInfo eventStreamInfo = selectObjectContentExample.runSelectObjectContentMethodForCSV();
        Assertions.assertTrue(eventStreamInfo.getCountOnRecordsCalled() > 0);
    }