static void configureEncryption(
      S3FileIOProperties s3FileIOProperties, PutObjectRequest.Builder requestBuilder) {
    configureEncryption(
        s3FileIOProperties,
        requestBuilder::serverSideEncryption,
        requestBuilder::ssekmsKeyId,
        requestBuilder::sseCustomerAlgorithm,
        requestBuilder::sseCustomerKey,
        requestBuilder::sseCustomerKeyMD5);
  }
@Test
  public void testConfigureEncryptionSkipNullSetters() {
    S3FileIOProperties s3FileIOProperties = new S3FileIOProperties();
    s3FileIOProperties.setSseType(S3FileIOProperties.SSE_TYPE_KMS);
    s3FileIOProperties.setSseKey("key");
    S3RequestUtil.configureEncryption(
        s3FileIOProperties,
        v -> null,
        v -> null,
        this::setCustomAlgorithm,
        this::setCustomKey,
        this::setCustomMd5);
    assertThat(serverSideEncryption).isNull();
    assertThat(kmsKeyId).isNull();
    assertThat(customAlgorithm).isNull();
    assertThat(customKey).isNull();
    assertThat(customMd5).isNull();
  }