public <T extends S3ClientBuilder> void applyEndpointConfigurations(T builder) {
    if (endpoint != null) {
      builder.endpointOverride(URI.create(endpoint));
    }
  }
@Test
  public void testApplyEndpointConfiguration() {
    Map<String, String> properties = Maps.newHashMap();
    properties.put(S3FileIOProperties.ENDPOINT, "endpoint");
    S3FileIOProperties s3FileIOProperties = new S3FileIOProperties(properties);
    S3ClientBuilder mockS3ClientBuilder = Mockito.mock(S3ClientBuilder.class);

    s3FileIOProperties.applyEndpointConfigurations(mockS3ClientBuilder);
    Mockito.verify(mockS3ClientBuilder).endpointOverride(Mockito.any(URI.class));
  }