added tests for prepareResult
added tests for preparePair and writeModules