bayer: add unit tests
@ndufresne
Submitted by Nicolas Dufresne Link to original bug (#772876)
Description
As of now, there is not even a template unit test for the bayer converter, and yet a lot of bug reports. It's a clear indication we need at least to create a minimal test so we can further improve when fixing bugs.