Refactor main module test