Unit tests for module controller.

It should be refactored to use let pattern.

Signed-off By: Fellipe Souto <fllsouto@gmail.com>