Add unittests for repofile.