Refatoring Main tests.