We all know that we should test our code. Flutter makes this really easy with all of testing frameworks that are coming bundled with it. You can write unit tests, widget tests and UI test.
Testing callbacks are particularly tiring. I bet you seen code like this many times, even more, if you are testing your widgets, I’m almost sure you have written this kind of code.