Added test for module's state. Fixes: #433.