add tests for modules

As I promised - some unit tests for module feature. 
Addendum to #40