Package org.elasticsearch.test
Class MockUtils
java.lang.Object
org.elasticsearch.test.MockUtils
Utilities for setting up Mockito mocks.
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic TransportService
Sets up a mock TransportService that can answer calls to TransportService.getThreadPool().executor(String).static TransportService
Sets up a mock TransportService that can answer calls to TransportService.getThreadPool().executor(String), using the given threadPool in TransportService.
-
Constructor Details
-
MockUtils
public MockUtils()
-
-
Method Details
-
setupTransportServiceWithThreadpoolExecutor
Sets up a mock TransportService that can answer calls to TransportService.getThreadPool().executor(String).- Returns:
- A mocked TransportService instance
-
setupTransportServiceWithThreadpoolExecutor
Sets up a mock TransportService that can answer calls to TransportService.getThreadPool().executor(String), using the given threadPool in TransportService.- Parameters:
threadPool
- A mock ThreadPool- Returns:
- A mocked TransportService instance
-