Only implementations that use platform channels
can be mocked. This means that if some implementations
don’t use platform channels,
your tests will unexpectedly use
real implementations when run on some platforms.

Platform channels are usually internal implementation
details of plugins.
They might change substantially even
in a bugfix update to a plugin,
breaking your tests unexpectedly.

Platform channels might differ in each implementation
of a federated plugin. For instance,
you might set up mock platform channels to
make tests pass on a Windows machine,
then find that they fail if run on macOS or Linux.

Platform channels aren’t strongly typed.
For example, method channels often use dictionaries
and you have to read the plugin’s implementation
to know what the key strings and value types are.

Because of these limitations, TestDefaultBinaryMessenger
is mainly useful in the internal tests
of plugin implementations,
rather than tests of code using plugins.

You might also want to check out
Testing plugins.