Adding tests and make the controller more testable

Hey Edy, how is going?

I was not able to start to test MetricsConversionController without change it. I swear to you that I spent a lot of time seeking a way to do that without change it but despite my effort and the great web research I not was able to figure out a way.
So I changed it a little bit if you not want merge this pull request I'll understand you.