tests: add implementation of an interface

The implementation as a method returning itself as its implemented
interface type.

https://bugzilla.gnome.org/show_bug.cgi?id=727824