Class RestActionTestCase.VerifyingClient

java.lang.Object
org.elasticsearch.client.internal.support.AbstractClient
org.elasticsearch.client.internal.node.NodeClient
org.elasticsearch.test.client.NoOpNodeClient
org.elasticsearch.test.rest.RestActionTestCase.VerifyingClient
All Implemented Interfaces:
Closeable, AutoCloseable, org.elasticsearch.client.internal.Client, org.elasticsearch.client.internal.ElasticsearchClient, org.elasticsearch.core.Releasable
Enclosing class:
RestActionTestCase

public static class RestActionTestCase.VerifyingClient extends NoOpNodeClient
A mocked NodeClient which can be easily reconfigured to verify arbitrary verification functions, and can be reset to allow reconfiguration partway through a test without having to construct a new object. By default, will throw AssertionError when any execution method is called, unless configured otherwise using setExecuteVerifier(java.util.function.BiFunction<org.elasticsearch.action.ActionType<R>, org.elasticsearch.action.ActionRequest, R>) or setExecuteLocallyVerifier(java.util.function.BiFunction<org.elasticsearch.action.ActionType<?>, org.elasticsearch.action.ActionRequest, org.elasticsearch.action.ActionResponse>).