@Test
    public void testSearch() throws Exception {
        final String indexName = "test_search";
        final String searchJson = "{\n  \"query\": {\n    \"match_all\": {}\n  }\n}";
        final JsonObject search = GSON.fromJson(searchJson, JsonObject.class);
        elasticsearchApi.createIndex(indexName);
        JsonObject result = elasticsearchApi.search(indexName, search);
        assertNotNull(result);
    }
Test cases for {@link ElasticsearchApi#search(String, JsonObject)}.

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