title: Unit testing functional interface
body: <p>I have a public method like this:</p>
  
  <pre><code>public List&lt;Resource&gt; getResource(Function&lt;InputStream, List&lt;Resource&gt;&gt; funcToExecute)
  {
      InputStream inp = getInputStream();
      return funcToExecute.apply(inp);
  }
  </code></pre>
  
  <p>How do I unit test this functionality? How do I establish relation between inputstream and list of resource to be returned in my Unit tests?</p>