Add tests for handlers

Handlers should be tested independently of controllers. I added
tests for current handlers.

Controller tests should mock the 'handler' part and test
controller code only. I have not modified any controller tests
due to the many pending patchs on the db that changes tests, in
order to avoid conflicts.

However, I will create a bug not to forget to improve controller
later

Change-Id: I0080c9456fd39af75bcac7642e1a225189bef59b
Merge "Add tests for handlers"