@Test
    public void testCreateIndexAndMapping() throws Exception {
        final String indexName = "test_create_index_and_mapping";
        final List<ElasticsearchFieldInfo> fieldInfos = new ArrayList<>();
        final ElasticsearchFieldInfo log_ts = new ElasticsearchFieldInfo();
        log_ts.setFieldType("keyword");
        log_ts.setFieldName("log_ts");
        fieldInfos.add(log_ts);
        elasticsearchApi.createIndexAndMapping(indexName, fieldInfos);
        assertTrue(elasticsearchApi.indexExists(indexName));
    }
Test cases for {@link ElasticsearchApi#createIndexAndMapping(String, List)}.

@throws Exception
inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/sink/ElasticsearchApiTest.java