Add unit test for function with mock class (so no real coverage for this).