Using Templates to add virtual tables to non-virtual classes
I don't know what framework you are using for your tests but gtest has type parametrised tests that you can use to test all the implementations​ with the same tests.

By using this feature you wouldn't even need the code to begin with, which in my book is the best code: the code you never wrote :)