Rather than using a partial mock (creating a dictionary, then stubbing one method) you could use a pure mock (create a double with a stubbed method). This keeps your test isolated: You're only testing the behaviour of `HeadAlgorithm` here, you shouldn't need a real `Dictionary` to do that.