Verify calls to dependency in unit test?
<p>For this following class I want to write a unit test:</p>

<pre><code>public class SomeClass {

    private Dependency dependency;

    public SomeClass(Dependency dep){
        this.dependency = dep;
    }

    private String processString(String s){
        /*
        edit the string and return
         */
    }

    public void doSomething(String arg){

        String processed = processString(arg);

        dep.doSomethingElse(processed);
    }
}
</code></pre>

<p>At first I would stub all the methods <code>SomeClass</code> calls on <code>Dependency</code> in order to test my class in isolation. 
But the question I couldn't yet find an answer to is :</p>

<p>Should I check <em>how</em> <code>SomeClass</code> calls methods of <code>Dependency</code> e.g. what parameters are passed etc. ? 
Of course this is a pretty trivial example, but I want to know if this should be part of a unit test in general.</p>

<p>Edit: In my case <code>Dependency</code> would be third party api library which I dont control. So I would consider it important what parameters are passed to these functions however I'm not sure this should be part of a unit test.</p>