Mock-based test for the interface

Move this to the test, one should never compare `XYZ`s, they are weakly typed.