title: How to verify if method of interface is called
body: <p>I would like to test if a method from an interface is called. For example, I would like to verify that "map.put(A,B)" is called like in the below code. How would I do this in Junit? Would I need to use Mockito?</p>
  
  <pre><code>
    public void funcName() {
      Map&lt;String, Object&gt; map = new HashMap&lt;&gt;();
      map.put("VALUE", new Object());
      ...
    }
  
  </code></pre>