For example:
//Real class
class Cat {
String sound() => "Meow";
}
//Mock class
class MockCat extends Mock implements Cat {}
//mock creation
var mockCat = new MockCat();
// Would throw exception "NoSuchMethodError: The method 'toUpperCase' was called on null.".
mockCat.sound().toUpperCase();
The actual cause is during the test development, developer forgot to write "when(cat.sound()).thenReturn("Purr");".
The message "'toUpperCase' was called on null" isn't helpful for finding out the casue and a more friendly message could be "'toUpperCase' was called on the return value of 'Cat.sound()', but no exceptions were set on it".
This could be achieved by returning instead of 'null' but a special object carrying the method invocation information for any 'un-expected' methods.
I can come with a design doc if this sounds possible.