public <T extends S3ClientBuilder> void applyUserAgentConfigurations(T builder) {
    ClientOverrideConfiguration.Builder configBuilder =
        null != builder.overrideConfiguration()
            ? builder.overrideConfiguration().toBuilder()
            : ClientOverrideConfiguration.builder();
    builder.overrideConfiguration(
        configBuilder
            .putAdvancedOption(SdkAdvancedClientOption.USER_AGENT_PREFIX, S3_FILE_IO_USER_AGENT)
            .build());
  }
@Test
  public void testApplyUserAgentConfigurations() {
    Map<String, String> properties = Maps.newHashMap();
    S3FileIOProperties s3FileIOProperties = new S3FileIOProperties(properties);
    S3ClientBuilder mockS3ClientBuilder = Mockito.mock(S3ClientBuilder.class);
    s3FileIOProperties.applyUserAgentConfigurations(mockS3ClientBuilder);

    Mockito.verify(mockS3ClientBuilder)
        .overrideConfiguration(Mockito.any(ClientOverrideConfiguration.class));
  }