add test for mem-repo
fix test. still need to impl mem-repo