Optimize code of asset registry repositories
Add tests of asset registry repositories