use of org.opensearch.client.opensearch.core.bulk.IndexOperation in project data-prepper by opensearch-project.
the class JavaClientAccumulatingBulkRequestTest method createBulkOperation.
private BulkOperation createBulkOperation(Object document) {
final IndexOperation indexOperation = mock(IndexOperation.class);
when(indexOperation.document()).thenReturn(document);
final BulkOperation bulkOperation = mock(BulkOperation.class);
when(bulkOperation.isIndex()).thenReturn(true);
when(bulkOperation.index()).thenReturn(indexOperation);
return bulkOperation;
}
Aggregations