Package org.elasticsearch.test
Class CheckedFunctionUtils
java.lang.Object
org.elasticsearch.test.CheckedFunctionUtils
Test utilities for working with
CheckedFunctions and CheckedSuppliers.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic <T,R, E extends Exception>
org.elasticsearch.core.CheckedFunction<T, R, E> Returns a Mockito matcher for any argument that is anCheckedFunction.static <R,E extends Exception>
CheckedSupplier<R, E> Returns a Mockito matcher for any argument that is anCheckedSupplier.
-
Constructor Details
-
CheckedFunctionUtils
public CheckedFunctionUtils()
-
-
Method Details
-
anyCheckedFunction
public static <T,R, org.elasticsearch.core.CheckedFunction<T,E extends Exception> R, anyCheckedFunction()E> Returns a Mockito matcher for any argument that is anCheckedFunction.- Type Parameters:
T- the function input type that the caller expects. Do not specify this, it will be inferredR- the function output type that the caller expects. Do not specify this, it will be inferredE- the function exception type that the caller expects. Do not specify this, it will be inferred- Returns:
- a checked function matcher
-
anyCheckedSupplier
Returns a Mockito matcher for any argument that is anCheckedSupplier.- Type Parameters:
R- the supplier output type that the caller expects. Do not specify this, it will be inferredE- the supplier exception type that the caller expects. Do not specify this, it will be inferred- Returns:
- a checked supplier matcher
-