@Override
    public DataSink createDataSink(Context context) {
        // Validate the configuration
        FactoryHelper.createFactoryHelper(this, context).validate();

        // Get the configuration directly from the context
        Configuration configuration =
                Configuration.fromMap(context.getFactoryConfiguration().toMap());

        // Validate required options
        validateRequiredOptions(configuration);

        ZoneId zoneId = determineZoneId(context);
        ElasticsearchSinkOptions sinkOptions = buildSinkConnectorOptions(configuration);
        return new ElasticsearchDataSink(sinkOptions, zoneId);
    }
@Test
    void testCreateDataSink() {
        DataSinkFactory sinkFactory = getElasticsearchDataSinkFactory();

        Configuration conf = createValidConfiguration();
        DataSink dataSink = createDataSink(sinkFactory, conf);

        Assertions.assertThat(dataSink).isInstanceOf(ElasticsearchDataSink.class);
    }