I have created a custom Elastic Search Client. I need to deploy unit testing on the various functions. How should I do that?
Say for example , in JUnit I use these ->
assertEquals(expectedOutput, actualOutput);
The problem here is that there is actually no return value. The queries execute and manipulate things. I want to unit test the various functions.
For example, I want to see if the index() works properly. I don't really want to actually index data and check if it has been indexed as I am not doing the integration testing right now. Can I do just unit testing?
Following is a method from my client. How should I deploy unit testing here?
@Override
public ActionFuture<IndexResponse> index(IndexRequest request)
{
TimerContext indexTimerContext=indexTimer.time();
super.index(request));
indexTimerContext.stop();
}
How should I really go about doing it?