Cache repositories and add test.