title: Unit Testing a custom ElasticSearch Client with JUnit
body: <p>I have created a custom Elastic Search Client. I need to deploy unit testing on the various functions. How should I do that?</p>
  
  <p>Say for example , in JUnit I use these -> </p>
  
  <pre><code>assertEquals(expectedOutput, actualOutput); 
  </code></pre>
  
  <p>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.</p>
  
  <p>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?</p>
  
  <p>Following is a method from my client. How should I deploy unit testing here?</p>
  
  <pre><code>@Override
          public ActionFuture&lt;IndexResponse&gt; index(IndexRequest request)
              {
                  TimerContext indexTimerContext=indexTimer.time();
                  super.index(request));
                  indexTimerContext.stop();
              }
  </code></pre>
  
  <p>How should I really go about doing it?</p>