Add tests for repository