Difference between stub and when in mockito
I am new to mockito. need to know difference between stub and when 1. stub(cpproxy.getBinList()).toReturn(gettestbins()); 2. when(cpproxy.getBinList()).thenReturn(gettestbins()); whats the difference between these two? Brice Actually they are technically the same. When Mockito was first created, we were talking about stubs, so the vocabulary followed that idea. Later people thought it was better to think in interactions rather that technical terms, so the vocabulary followed the when ... then ... style. This change in vocabulary helps people to think about interactions , messaging between