Core concept
var svc = mock(Service.class);
when(svc.get()).thenReturn("x");
verify(svc, times(1)).get();Advertisement
How it works
Can't mock final classes historically. mockito-inline enables.
Advertisement
Trade-offs + gotchas
Unit tests with dependency isolation.