A Matter of Interpretation: Mock Objects - The Code Whisperer

@jbrains, I believe that cited person meant Mocks specifically, in the sense that you explicitly define their behavior in test setup (eg. what Mockito offers in Java world), contrasting it to other test doubles.

I share that sentiment. I eg. prefer to use hash map backed implementation of repository over creating a mock and setting up expectations.

Ironically (?) I was challenged few times on using stub implementation like described above instead of mocking, and my answer was what you explain in article: you wouldn’t make a list = mock(List.class) where you could just use list = new ArrayList() in your test.