问题
How do I mock elastic search data. In the below code rs
is an interface which is implemented by ElasticSearchDriver
class. rs
will have elastic search db details which inturn gets added in the results.
While writing unit tests for this code how do we mock the elastic search data.
ListThread listThread = new ListThread(rs, index, QueryMap, sortOrder)
results.add(executor.submit(listThread));
来源:https://stackoverflow.com/questions/40084131/mock-elastic-search-data